Trending questions in Laravel

0 votes
1 answer

Error:file_put_contents(): Exclusive locks are not supported for this stream

Hello, After update do: chmod -R gu+w storage chmod -R ...READ MORE

Dec 1, 2020 in Laravel by Niroj
• 82,880 points
3,523 views
0 votes
1 answer

How to remove Parameter From All Request Objects at Controller Level?

Hello @kartik, First arrange for the middleware to ...READ MORE

Oct 21, 2020 in Laravel by Niroj
• 82,880 points
5,327 views
0 votes
1 answer

How to make auto login after registration in laravel?

Hello, You can try to login the user ...READ MORE

Nov 2, 2020 in Laravel by Niroj
• 82,880 points
4,784 views
0 votes
1 answer

Laravel Eloquent Query Builder Default Where Condition

Hello, normally override newQuery() for this. newQuery() is the method that Eloquent ...READ MORE

Dec 3, 2020 in Laravel by Niroj
• 82,880 points
3,402 views
0 votes
1 answer

How Laravel Eloquent Model Attributes maps to the table?

Hello @kartik, If your model is filled with ...READ MORE

Dec 1, 2020 in Laravel by Niroj
• 82,880 points
3,380 views
0 votes
1 answer

How to check if a user email already exist?

Hello @kartik, The validation feature built into Laravel ...READ MORE

Dec 7, 2020 in Laravel by Niroj
• 82,880 points
3,101 views
0 votes
1 answer

How can I get the error message for the mail() function?

Hello @kartik, You can use error_get_last() when mai l()returns false. $success = mail('example@example.com', ...READ MORE

Jul 30, 2020 in Laravel by Niroj
• 82,880 points
8,616 views
0 votes
1 answer

How throw forbidden exception from middleware in laravel5?

Hello @kartik, You can simply use the abort() helper. (Or App::abort()) public ...READ MORE

Oct 23, 2020 in Laravel by Niroj
• 82,880 points
4,940 views
0 votes
1 answer

How to compare two encrypted(bcrypt) password in laravel?

Hello @kartik, You can simply use Hash::check() method eg: if(Hash::check('plain-text', $hashedPassword)) ...READ MORE

Oct 21, 2020 in Laravel by Niroj
• 82,880 points
4,914 views
0 votes
1 answer

How to configure Laravel mail.php to use built-in mail function?

Hello, To do the same as mail() PHP ...READ MORE

Dec 3, 2020 in Laravel by Niroj
• 82,880 points
2,921 views
0 votes
1 answer

How to match input password and database hash password in laravel?

Hello @kartik, First, you'll need to find the ...READ MORE

Sep 30, 2020 in Laravel by Niroj
• 82,880 points
5,579 views
0 votes
1 answer

How to use withErrors with Exception error messages in Laravel?

Hello @kartik, Try this: return Redirect::to('admin/users/create') ...READ MORE

Oct 28, 2020 in Laravel by Niroj
• 82,880 points
4,361 views
0 votes
1 answer

Error : Call to undefined method Illuminate\Http\Request::put()

Hello, You need to customize the request $data = ...READ MORE

Nov 11, 2020 in Laravel by Niroj
• 82,880 points
3,755 views
0 votes
1 answer

Error:Symfony\Component\Debug\Exception\FatalErrorException] syntax error, unexpected ',', expecting variable (T_VARIABLE)

Hii, Try this command: php -S localhost:8000 -t public Then ...READ MORE

Dec 4, 2020 in Laravel by Niroj
• 82,880 points
2,762 views
0 votes
1 answer

How to get the id when you're validating in the model Validation unique on update using laravel?

Hello @kartik, in Laravel's inbuilt auth system, the ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,880 points
6,263 views
0 votes
1 answer

How do I get raw form data in laravel?

Hii @kartik, Laravel intercepts all input. If you're ...READ MORE

Oct 28, 2020 in Laravel by Niroj
• 82,880 points
4,219 views
0 votes
1 answer

How to Get the Current URL Inside @if Statement in Laravel?

Hello @kartik, You can use: Request::url() to obtain the current ...READ MORE

Nov 11, 2020 in Laravel by Niroj
• 82,880 points
3,580 views
0 votes
1 answer

How can I pass parameter from Route to Filter in laravel?

Hii, Filters can be passed parameters, like the ...READ MORE

Dec 4, 2020 in Laravel by Niroj
• 82,880 points
2,506 views
0 votes
1 answer

How to create migration from existing database in laravel?

Hello @kartik,  Laravel migration generator for your existing ...READ MORE

Dec 7, 2020 in Laravel by Niroj
• 82,880 points
2,368 views
0 votes
1 answer

How to invalidate all tokens for an user in laravel passport?

Hello @kartik, One of the methods it provides ...READ MORE

Oct 23, 2020 in Laravel by Niroj
• 82,880 points
4,269 views
0 votes
1 answer

Error: Can't get session in controller constructor

Hello @kartik, You can't do it by default ...READ MORE

Dec 2, 2020 in Laravel by Niroj
• 82,880 points
2,547 views
0 votes
1 answer

How to asynchronous shell exec in PHP?

Hello @kartik, good way to run an asynchronous ...READ MORE

Sep 29, 2020 in Laravel by Niroj
• 82,880 points
5,278 views
0 votes
1 answer

How to validate exact words in Laravel?

Hello, Try this code: // option one: 'in' takes ...READ MORE

Dec 4, 2020 in Laravel by Niroj
• 82,880 points
2,390 views
0 votes
1 answer

How do you check if a field is not null with Eloquent?

Hello @kartik, Simply,we can use Model::whereNotNull('sent_at'); Or Model::whereRaw('sent_at is not null'); Thank ...READ MORE

Nov 11, 2020 in Laravel by Niroj
• 82,880 points
3,383 views
0 votes
1 answer

How do I include partials from a blade layout in laravel?

Hello @kartik, You need to give the full ...READ MORE

Nov 2, 2020 in Laravel by Niroj
• 82,880 points
3,755 views
0 votes
1 answer

How to get the server IP with Laravel?

Hello @kartik, You can use request object: request()->server('SERVER_ADDR'); Or you ...READ MORE

Nov 2, 2020 in Laravel by Niroj
• 82,880 points
3,707 views
0 votes
1 answer

How to break a for each loop in laravel blade view?

Hello @kartik, By default, blade doesn't have @break and @continue which are ...READ MORE

Apr 6, 2020 in Laravel by Niroj
• 82,880 points
12,722 views
0 votes
1 answer

How to use API Routes in Laravel?

Hello @kartik, You call it by http://localhost:8080/api/test ...READ MORE

Aug 10, 2020 in Laravel by Niroj
• 82,880 points
7,284 views
0 votes
1 answer

Error:The Response content must be a string or object implementing __toString(), "boolean" given.

Hello @kartik, Your response must return some sort ...READ MORE

Sep 24, 2020 in Laravel by Niroj
• 82,880 points
5,297 views
0 votes
1 answer

Error:Loading composer repositories with package information Updating dependencies (including require-dev) Killed

Hello @kartik, The "Killed" message usually means your ...READ MORE

Aug 4, 2020 in Laravel by Niroj
• 82,880 points
7,506 views
0 votes
1 answer

Why to use DB::raw inside DB::select in Laravel?

Hello @kartik, DB::raw() is used to make arbitrary SQL ...READ MORE

Oct 28, 2020 in Laravel by Niroj
• 82,880 points
3,819 views
0 votes
1 answer

How laravel Lumen Ensure JSON response?

Hello @kartik, You'll need to adjust your exception ...READ MORE

Dec 2, 2020 in Laravel by Niroj
• 82,880 points
2,223 views
0 votes
1 answer

How do you wrap Laravel Eloquent ORM query scopes in parentheses when chaining?

Hello @kartik, You can generate parentheses by passing ...READ MORE

Dec 2, 2020 in Laravel by Niroj
• 82,880 points
2,170 views
0 votes
1 answer

How to chunk results from a custom query in Laravel

Hello @kartik, Try something like this: <?php $max = 100; $total ...READ MORE

Dec 7, 2020 in Laravel by Niroj
• 82,880 points
1,961 views
0 votes
1 answer

How to order results of related models in laravel eloquent?

Hello @kartik, You have a few ways of ...READ MORE

Dec 8, 2020 in Laravel by Niroj
• 82,880 points
1,810 views
0 votes
1 answer

How to delete queued jobs in laravel?

Hello @kartik, Restart Beanstalk: sudo service beanstalkd restart ...READ MORE

Dec 2, 2020 in Laravel by Niroj
• 82,880 points
2,077 views
0 votes
1 answer

How can I access my Laravel app from another PC?

Hello @kartik, Use: sudo php artisan serve --host 192.168.1.101 ...READ MORE

Oct 23, 2020 in Laravel by Niroj
• 82,880 points
3,767 views
0 votes
1 answer

How do I write to the console from a Laravel Controller?

Hello @kartik, This can be done with the ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,880 points
6,888 views
0 votes
1 answer

How to pass data to mail View in laravel Mail send?

Hello @kartik, Send data like this. $data = [ ...READ MORE

Jul 30, 2020 in Laravel by Niroj
• 82,880 points
7,365 views
0 votes
1 answer

How to get response from Artisan call?

Hello @kartik,  You can simply use: Artisan::output() READ MORE

Dec 2, 2020 in Laravel by Niroj
• 82,880 points
1,946 views
0 votes
1 answer

How to Select Certain Fields in Laravel Eloquent?

Hello @kartik, lists() turns the resulting collection into an ...READ MORE

Oct 21, 2020 in Laravel by Niroj
• 82,880 points
3,784 views
0 votes
1 answer

How to post the values into validation and return the response as json rather than return view in laravel blade?

Hii, You can also tell Laravel you want ...READ MORE

Nov 12, 2020 in Laravel by Niroj
• 82,880 points
2,799 views
0 votes
1 answer

How do I insert user into mysql table from within Laravel?

Hello @kartik, First Create seeder with artisan: php artisan make:seeder ...READ MORE

Nov 12, 2020 in Laravel by Niroj
• 82,880 points
2,770 views
0 votes
1 answer

In an Laravelcollective submit button how to add icon?

Hello @kartik, Try to use Form::button instead of ...READ MORE

Dec 4, 2020 in Laravel by Niroj
• 82,880 points
1,808 views
0 votes
1 answer

How to use paginate() with a having() clause when column does not exist in table

Hello @kartik, You can calculate the distance in ...READ MORE

Dec 2, 2020 in Laravel by Niroj
• 82,880 points
1,853 views
0 votes
1 answer

How to add new value in collection laravel?

Hello @kartik, If you have a collection you ...READ MORE

Dec 4, 2020 in Laravel by Niroj
• 82,880 points
1,746 views
0 votes
1 answer

How To Cast Eloquent Pivot Parameters?

Hello, In Laravel 5.1 or higher you can ...READ MORE

Nov 12, 2020 in Laravel by Niroj
• 82,880 points
2,621 views
0 votes
1 answer

How to delete a single record in Laravel 5?

Hello @kartik, Delete an existing Model $user = User::find(1); $user->delete(); Deleting ...READ MORE

Dec 2, 2020 in Laravel by Niroj
• 82,880 points
1,685 views
0 votes
1 answer

How to show all the variables as proper currency format in laravel?

Hello, You could create a custom Laravel directive. You ...READ MORE

Nov 2, 2020 in Laravel by Niroj
• 82,880 points
2,998 views
0 votes
1 answer

How do I set laravel test to go to site name instead of localhost?

Hii, For Laravel 5, In the tests directory there should ...READ MORE

Nov 2, 2020 in Laravel by Niroj
• 82,880 points
2,994 views