Trending questions in Laravel

+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,870 points
131,777 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,840 points
123,880 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,870 points
95,520 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,840 points
88,788 views
+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,840 points
73,755 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,770 points
66,210 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
50,814 views
0 votes
1 answer

Error: 'Unchecked runtime.lastError: The message port closed before a response was received' chrome issue?

Hii, I had same problem when responding on ...READ MORE

Mar 30, 2020 in Laravel by Niroj
• 82,840 points
53,439 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,840 points
48,821 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,770 points
42,386 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,840 points
41,312 views
0 votes
1 answer

How do I get a “select count(*) group by” using laravel eloquent?

Hello @kartik, You could use this: $reserves = DB::table('reserves')->selectRaw('*, ...READ MORE

Oct 21, 2020 in Laravel by Niroj
• 82,840 points
35,613 views
+1 vote
1 answer

What are named routes in Laravel and How can specify route names for controller actions?

Hey @kartik, Named routing is another amazing feature of ...READ MORE

Mar 23, 2020 in Laravel by Niroj
• 82,840 points
44,691 views
0 votes
1 answer

How to pass CSRF token with ajax request in Laravel?

Hey, In between head, tag put <meta name="csrf-token" ...READ MORE

Mar 24, 2020 in Laravel by Dey
39,792 views
0 votes
1 answer

How to pass an array as a URL parameter?

Hello, Here you can try this out var myArray ...READ MORE

Apr 14, 2020 in Laravel by Niroj
• 82,840 points
37,912 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,840 points
27,393 views
0 votes
0 answers

Laravel 5.3 - TokenMismatchException in VerifyCsrfToken.php line 68:

How can I fix the title-related issue ...READ MORE

Jul 28, 2022 in Laravel by Kithuzzz
• 38,000 points
1,110 views
0 votes
1 answer

How to Use Order By for Multiple Columns in Laravel ?

Hii, Use order by like this: return User::orderBy('name', 'DESC') ...READ MORE

Nov 11, 2020 in Laravel by Niroj
• 82,840 points
27,818 views
0 votes
1 answer

How to validate array in Laravel?

Hello @kartik, you can call validate() method directly ...READ MORE

Aug 10, 2020 in Laravel by Niroj
• 82,840 points
31,260 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
27,499 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,840 points
24,622 views
0 votes
1 answer

Explain Guarded Attribute in a Laravel model?

Hii, The guarded attribute is the opposite of ...READ MORE

Mar 27, 2020 in Laravel by Niroj
• 82,840 points
34,961 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
31,200 views
0 votes
1 answer

Error:Laravel - Session store not set on request

Hello @kartik, You'll need to use the web middleware if ...READ MORE

Aug 4, 2020 in Laravel by Niroj
• 82,840 points
28,111 views
+1 vote
1 answer

How to get public directory in laravel?

Hello @kartik, Use public_path() For reference: // Path to the project's ...READ MORE

Aug 10, 2020 in Laravel by Niroj
• 82,840 points
27,584 views
0 votes
1 answer

What do you meant by dd() function in Laravel?

Hey @kartik dd stands for "Dump and Die." Laravel's ...READ MORE

Mar 20, 2020 in Laravel by Niroj
• 82,840 points
33,459 views
+1 vote
1 answer

How to check if a record already exists in a laravel?

Hey, As a newbie it is most common ...READ MORE

Mar 31, 2020 in Laravel by Niroj
• 82,840 points
32,710 views
+1 vote
1 answer

Error:Class '\App\User' not found in Laravel when changing the namespace in Laravel?

Hello @kartik Go to config/auth.php and change App\User:class ...READ MORE

Apr 3, 2020 in Laravel by Niroj
• 82,840 points
30,165 views
+1 vote
1 answer

Error [PDOException]: Could not Find Driver in PostgreSQL?

Hii, I got this problem too. I have ...READ MORE

Mar 31, 2020 in Laravel by Niroj
• 82,840 points
29,991 views
0 votes
1 answer

I get this error > Trying to get property of non-object . How to fix it?

Hello @aakash, If you want to save grades ...READ MORE

Aug 17, 2020 in Laravel by Niroj
• 82,840 points
24,014 views
0 votes
1 answer

The stream or file "/var/www/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

Hello @kartik, Make your Dockerfile something as below ...READ MORE

Sep 30, 2020 in Laravel by Niroj
• 82,840 points
21,473 views
0 votes
1 answer

What is yield in Laravel and what is the use of yield?

Hii kartik, In Laravel, @yield is principally used to define ...READ MORE

Mar 23, 2020 in Laravel by Niroj
• 82,840 points
29,037 views
+1 vote
1 answer

How to load blade or php content into a view via ajax/jquery in laravel?

Hello @kartik, Assuming you're using jQuery... create a route ...READ MORE

Apr 14, 2020 in Laravel by Niroj
• 82,840 points
27,958 views
+1 vote
1 answer

How can I run specific migration in laravel?

Hello @kartik, Use this command it worked for ...READ MORE

Aug 4, 2020 in Laravel by Niroj
• 82,840 points
23,109 views
0 votes
1 answer

How to use Postman for Laravel $_POST request?

Hello @kartik, 1.You can create a new route ...READ MORE

Dec 1, 2020 in Laravel by Niroj
• 82,840 points
15,561 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,840 points
15,297 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,840 points
14,744 views
+1 vote
1 answer

Laravel Error: 419 session expired

Hello @kartik, To fix the Laravel error 419 session ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,840 points
17,703 views
0 votes
1 answer

How to revert 'php artisan serve' command in laravel

Hello @kartik, Press Ctrl + Shift + ESC. Locate the php process running ...READ MORE

Sep 28, 2020 in Laravel by Niroj
• 82,840 points
16,832 views
0 votes
1 answer

How to place the ~/.composer/vendor/bin directory in your PATH?

Hello @kartik, To put this folder on the ...READ MORE

Apr 2, 2020 in Laravel by Niroj
• 82,840 points
24,142 views
0 votes
1 answer

How to select count with Laravel's fluent query builder?

Hello @kartik, You can use an array in ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,840 points
17,051 views
0 votes
1 answer

Error: The requested URL /login was not found on this server. Apache (Ubuntu) Server at mydomain.com Port 80

Hello @kartik,  your directory path is wrong. You ...READ MORE

Nov 12, 2020 in Laravel by Niroj
• 82,840 points
14,027 views
0 votes
1 answer

How to validate an input field if value is not null in Laravel?

Hello @kartik, try using nullable as a rule 'password' ...READ MORE

Sep 25, 2020 in Laravel by Niroj
• 82,840 points
15,947 views
0 votes
1 answer

How to Insert a value to hidden input Laravel Blade?

Hello @kartik, Usually, this is used in Blade ...READ MORE

Dec 1, 2020 in Laravel by Niroj
• 82,840 points
12,821 views
0 votes
1 answer

How to select year and month from the created_at attributes of database table in laravel 5.1?

Hello @kartik, There are date helpers available in ...READ MORE

Sep 30, 2020 in Laravel by Niroj
• 82,840 points
15,439 views
0 votes
1 answer

How to set session timeout in Laravel?

Hello, In app/config/session.php you have: lifetime option that allow you to set session ...READ MORE

Dec 1, 2020 in Laravel by Niroj
• 82,840 points
12,511 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
14,892 views
0 votes
1 answer

How to manually run a laravel job using command line?

Hello, If you are using a QUEUE_DRIVER diferent to sync and you ...READ MORE

Nov 2, 2020 in Laravel by Niroj
• 82,840 points
13,620 views
0 votes
1 answer

How to install all required PHP extensions for Laravel?

Hello, Laravel Server Requirements mentions that BCMath, Ctype, JSON, Mbstring, OpenSSL, PDO, Tokenizer and XML extensions are required. Most the ...READ MORE

Apr 6, 2020 in Laravel by Niroj
• 82,840 points
22,593 views
0 votes
1 answer

How to get distinct values for non-key column fields in Laravel?

Hello @kartik In eloquent you can use this $users ...READ MORE

Mar 30, 2020 in Laravel by Niroj
• 82,840 points
22,799 views