Support the ongoing development of Laravel.io →
Requests Forms
Last updated 1 year ago.
0

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.

Here: https://laracasts.com/lessons/get-off-mamp-now

Last updated 1 year ago.
0

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();
}
Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.