Support the ongoing development of Laravel.io →
posted 10 years ago
Database
Last updated 2 years ago.
0

Try deleting the comma before the last parenthesis in the following lines:

$newuser = array( 'name' => Input::get('name'), 'number'=>Input::get('number'), 'location'=>Input::get('location'), 'phone'=>Input::get('phone'), );
Last updated 2 years ago.
0

The problem still exists

Last updated 2 years ago.
0

Is your $newuser variable accesible globally?

Last updated 2 years ago.
0

yes is globally

Last updated 2 years ago.
0

The problem enters the function post without adding data to the database

Last updated 2 years ago.
0

this problem

public function save() { $newStudent = array( 'name' => Input::get('name'), 'number'=>Input::get('number'), 'location'=>Input::get('location'), 'phone'=>Input::get('phone'), );

$rules = array(
  # validation code
           'name' => 'Required|Min:3|Max:80|Alpha',
           'number'=> 'Required|Between:3,64',
           'location'=> 'Required|Min:3|Max:80|Alpha',
           'phone'=>'Required|Between:3,64',
);

$newStudent = new User($newStudent); $newStudent->save(); }

Last updated 2 years 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.