Answers for "laravel method"

PHP
0

laravel 8 routes namespace

Route::group(['namespace' => 'App\Http\Controllers', 'prefix' => 'admin',
 'as' => 'admin.', 'middleware' => ['auth:sanctum', 'verified']], function()
{
    Route::get('/dashboard', ['DashboardController', 'index']);
});
Posted by: Guest on December-06-2020
0

laravel get all request parameters

$request->input('name');
$request->input('user.name'); // fetch from user object
Posted by: Guest on November-13-2020
0

Laravel create method

Alternatively, there's also a create method which accepts a plain PHP array instead of an Eloquent model instance.
$post = Post::find(1);

$post->comments()->create([
    'message' => 'This is a new comment message'
]);
Posted by: Guest on July-14-2021

Browse Popular Code Answers by Language