is there any error ?
Laravel can use with MAMP. it need (php 5.4, mcrypt).
I recommend you to use Vagrant and homestead.
for more information.
No error but it doesn't update the database. I use the Form::open() in blade for making the form.
In normal htdocs the form action reads: http://localhost/tutorials/laravel/todo_app/public In artisan serve it reads: http:://localhost:8000
These are the files and code used. It works ok using artisan server but not going through regular MAMP. All other features work ok, adding and deleting
// route file
Route::post('/', array('uses' => 'HomeController@postIndex'))->('csrf');
// HomeController
public function postIndex()
{
$id = Input::get('id');
$item = Item::findOrFail($id);
if($item->owner_id == Auth::user()->id)
{
$item->mark();
}
}
// mark
public function mark()
{
$this->done = $this->done ? false : true;
$this->save();
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community