Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [laravel] problem z routingiem
dżozef
post 22.07.2013, 21:12:15
Post #1





Grupa: Zarejestrowani
Postów: 125
Pomógł: 9
Dołączył: 25.05.2013

Ostrzeżenie: (0%)
-----


routes.php:
  1. <?php
  2. Route::controller('/', 'SnippetsController');

snippetsController:
  1. <?php
  2.  
  3. class SnippetsController extends BaseController {
  4.  
  5. public function getIndex(){
  6. return View::make('snippet.new');
  7. }
  8.  
  9. public function postIndex() {
  10. return 'post';
  11. }
  12. }

snippet/new.blade.php:
  1. @extends('master')
  2.  
  3. @section('container')
  4. {{ Form::open(array('url'=>'/', 'method'=>'post')) }}
  5. {{ Form::textarea('snippet') }}
  6. {{ Form::submit('Save') }}
  7. {{ Form::close() }}
  8. @stop


teoretycznie naciśnięcie [Save] powinno odpalić metodę postIndex(), jednak z jakichś powodów cały czas pokazuje mi getIndex()
co robię źle?

podbijam


--------------------
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 26.06.2025 - 07:08