Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [laravel] problem z routingiem
dżozef
post
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
 
Start new topic
Odpowiedzi
dżozef
post
Post #2





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

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


aż tak zielony nie jestem. próbowałem na dziesiątki różnych sposobów, z post/put ale ciągle nie działa, na końcu spróbowałem bez - i też lipa
Go to the top of the page
+Quote Post

Posty w temacie


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

 



RSS Aktualny czas: 15.10.2025 - 22:11