Recent Post

Laravel migration default value

Laravel migration default value

Put the default value in single quote and it will work as intended. An example of migration: $table->increments('id'); $table->string('name'); $table->string('url'); $table->string('country'); $table->tinyInteger('status')->default('1'); $table->timestamps(); ...

Read More
How to Insert and get id in laravel?

How to Insert and get id in laravel?

Use insertGetId(); it gives you the id of an inserted row. $userId = User::insertGetId([ 'name' => $request->input('name'), 'email' => $request->input('email'), 'password' => bcrypt($request->input('password'))...

Read More
apione.in