Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- class NoticiasController extends AppController
- {
- public function read()
- {
- $slug = $this->request->param('noticia'); //Pega o slug da notícia vindo do router...
- $noticia = $this->Noticia->findBySlug($slug); //Pega a notícia baseada no slug
- $this->set(compact('noticia')); //Envia pra view
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement