Most answered questions in Laravel

+1 vote
5 answers

How to get user's IP address in Laravel?

Hey, We can get the user's IP address ...READ MORE

Mar 20, 2020 in Laravel by Niroj
• 82,880 points
71,236 views
+1 vote
4 answers

How to access images inside public folder in laravel?

If you are inside a blade template {{ ...READ MORE

Dec 14, 2020 in Laravel by Rajiv
• 8,910 points
128,073 views
+1 vote
3 answers

Error: Exception file_put_contents failed to open stream: No such file or directory in Laravel?

Hello, You should typically run the php artisan config:cache command ...READ MORE

Mar 31, 2020 in Laravel by Niroj
• 82,880 points
47,688 views
0 votes
2 answers

How to pass variable to next page using php?

Simply use Sessions my friend Page1: session_start(); $ ...READ MORE

Oct 6, 2020 in Laravel by anonymous
• 140 points
13,575 views
0 votes
2 answers

How to delete file from public folder in laravel?

I just want to add @niroj answer  Use ...READ MORE

Nov 5, 2020 in Laravel by Helloworld
• 140 points
26,303 views
0 votes
2 answers

Error:Composer: file_put_contents(./composer.json): failed to open stream: Permission denied

I used sudo and it managed to ...READ MORE

Nov 2, 2020 in Laravel by anonymous
46,869 views
+6 votes
2 answers

Error:Uncaught ReferenceError: is not defined at HTMLAnchorElement.onclick

The most common reason behind the error ...READ MORE

Dec 14, 2020 in Laravel by Gitika
• 65,910 points
64,900 views
0 votes
2 answers

Error:Failed to open stream: Permission denied in Laravel?

I had this problem lately with my ...READ MORE

Nov 4, 2020 in Laravel by anonymous
• 140 points
16,377 views
0 votes
2 answers

Error:Class 'App\Http\Controllers\App\Model' not found?

Class ‘App\Http\Controllers\Auth’ Not Found in Class ‘App\Http\Controllers\Auth’ not ...READ MORE

Aug 6, 2020 in Laravel by pakainfo
17,077 views
0 votes
2 answers

How to solve expected response code 220 but got code “”, with message “” in Laravel?

This problem can generally occur when you ...READ MORE

Dec 16, 2020 in Laravel by Gitika
• 65,910 points
40,959 views
+3 votes
2 answers

Error - 419 Sorry, your session has expired.Post request in Laravel?

Sometimes the cache can also lead to ...READ MORE

Aug 28, 2020 in Laravel by Ishita
• 150 points
30,109 views
+2 votes
2 answers

How to add a new column to existing table of laravel in a migration?

You need do little modification in your ...READ MORE

Dec 10, 2020 in Laravel by anonymous
• 82,880 points
120,122 views
0 votes
2 answers

Describe Fillable Attribute in a Laravel model?

Hello @kartik In eloquent ORM, $fillable attribute is ...READ MORE

Mar 27, 2020 in Laravel by Niroj
• 82,880 points
40,565 views
0 votes
2 answers

Error:Laravel Installation failed, reverting ./composer.json to its original content.?

Hello, You need to install php zip extension. Something ...READ MORE

Mar 26, 2020 in Laravel by Niroj
• 82,880 points
82,821 views
0 votes
2 answers

How to delete or clear caching in Laravel?

You can call an Artisan command outside ...READ MORE

Dec 16, 2020 in Laravel by Rajiv
• 8,910 points
94,703 views
0 votes
1 answer

How can I obtain a list of all files in a public folder in laravel?

You could create another disk for Storage ...READ MORE

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

Required_if laravel with multiple value

You just have to pass all the ...READ MORE

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

How to get all the users except current logged in user in laravel eloquent?

Hello @kartik, You can get the current user's ...READ MORE

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

TypeError: process.getuid is not a function”

Hello @kartik, Simply running npm install solved it for ...READ MORE

Dec 8, 2020 in Laravel by Niroj
• 82,880 points
1,154 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,837 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
2,004 views
0 votes
1 answer

How to check if a cookie is set in laravel?

Hello @kartik, You can change: @if (Cookie::get('cookiename') !== false) to @if ...READ MORE

Dec 7, 2020 in Laravel by Niroj
• 82,880 points
3,653 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,140 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,408 views
0 votes
1 answer

How to insert raw data in mysql database in laravel?

Try this: Suppose you have the following tables ...READ MORE

Dec 7, 2020 in Laravel by Niroj
• 82,880 points
973 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,430 views
0 votes
1 answer

How to redirect to Login if user not logged in Laravel?

Hello @kartik, You can use it in middleware. ...READ MORE

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

How to delete confirmation in laravel?

Hello @kartik, If this is your link: <a href="#" ...READ MORE

Dec 4, 2020 in Laravel by Niroj
• 82,880 points
715 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,806 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,787 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,579 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,868 views
0 votes
1 answer

How can I change variables in the .env file dynamically in Laravel?

Hii, You can created the function below: public static ...READ MORE

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

How to Find User in Laravel by Username?

Hello, using the model. just like this User::where('username','John') -> ...READ MORE

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

How to rename the "label" to "Resource Test"?

Hello, You can override the static label method ...READ MORE

Dec 3, 2020 in Laravel by Niroj
• 82,880 points
842 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,952 views
0 votes
1 answer

Error:Laravel PackageManifest.php: Undefined index: name

Hello, Try this, it is worked for me, ...READ MORE

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

How to make Laravel (Blade) text field read only?

Just add it as the 3rd argument: {{ ...READ MORE

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

Laravel validation exists where NOT

You can use unique Example 'email' => 'unique:users,email ...READ MORE

Dec 3, 2020 in Laravel by Niroj
• 82,880 points
5,090 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,457 views
0 votes
1 answer

Error:Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER'

Hello @kartik, your laravel connexion (config / database.php) ...READ MORE

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

How can I find the current language in a Laravel view?

Hello @kartik, The cleanest way to know the ...READ MORE

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

How to select all column name from a table in laravel?

You can get all columns name by ...READ MORE

Dec 2, 2020 in Laravel by Niroj
• 82,880 points
5,990 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,880 views
0 votes
1 answer

How to “Refresh” the User object in Laravel?

Hello @kartik, You can update the cache object ...READ MORE

Dec 2, 2020 in Laravel by Niroj
• 82,880 points
523 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,979 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,128 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,710 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,258 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,243 views