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
863 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,552 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,527 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,885 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,174 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,849 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,012 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,676 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,156 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,429 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
979 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,446 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,861 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
723 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,829 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,800 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,608 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,887 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,955 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,925 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
846 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,969 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,976 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,019 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,133 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,484 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,545 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,975 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,016 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,887 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
526 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,004 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,151 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,720 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,268 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,275 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,626 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,935 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,578 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
794 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,224 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,018 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,446 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,752 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
923 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,557 views