Latest questions in Laravel

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,010 points
865 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,563 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,538 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,893 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,179 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,851 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,017 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,686 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,161 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,431 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
983 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,450 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,909 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
726 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,832 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,801 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,616 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,892 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,958 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,947 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
849 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,970 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,990 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,022 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,146 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,488 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,557 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,979 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
6,021 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,890 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
528 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
2,010 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,156 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,723 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,271 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,280 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,633 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,880 points
11,953 views
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,581 views
0 votes
1 answer

How to simplify this Laravel PHP code to one Eloquent query?

Hello @kartik, You create realtionship between both table friend and user in ...READ MORE

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

How and where can store images with laravel?

Hello, Make directory for images in myapp/public/images and ...READ MORE

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

Error:return \Redirect::route('regions')->with('message', 'State saved correctly!!!');

Hello @kartik, You can pass the route parameters ...READ MORE

Dec 1, 2020 in Laravel by Niroj
• 82,880 points
862 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,880 points
12,238 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,880 points
15,028 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,448 views
0 votes
1 answer

Error:Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation

Hello @kartik, When you try to access a ...READ MORE

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

How can I define a route differently if parameter is not integer?

Hello @kartik, Just add ->where('id', '[0-9]+') to route where you ...READ MORE

Dec 1, 2020 in Laravel by Niroj
• 82,880 points
927 views
0 votes
0 answers

how to create exception in react router using Route::get('/{path?}', 'IndexController@index')->name('index') ->where('path', '.*');

I am using react routers within Laravel ...READ MORE

Nov 15, 2020 in Laravel by datso
• 120 points

recategorized Nov 16, 2020 by Niroj 477 views
0 votes
1 answer

How to run some migrations on new user's database after its creation?

Hello, If you place database config on the database.php file, ...READ MORE

Nov 12, 2020 in Laravel by Niroj
• 82,880 points
462 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,880 points
13,572 views