Trending questions in Laravel

0 votes
1 answer

How to change Yarn default packages directory?

Hello @kartik, You can create a .yarnrc file with the ...READ MORE

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

How to return database table name in Laravel?

Hello @kartik, There is a public getTable() method ...READ MORE

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

How to run migrations on another database in laravel?

Hello @kartik, If you place database config on ...READ MORE

Sep 28, 2020 in Laravel by Niroj
• 82,880 points
2,536 views
0 votes
1 answer

Error: reverting ./composer.json to its original content

Hello @kartik, I used to use this: composer require ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,880 points
3,233 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 485 views
0 votes
1 answer

How to “Refresh” the User object in Laravel?

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

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

How to detect a mobile device in PHP?

Hello @kartik, Here is the code: <?php $useragent=$_SERVER['HTTP_USER_AGENT']; if(preg_match('/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( ...READ MORE

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

Error:Missing argument 2 for App\Http\Controllers\EventsController::remindHelper()

Hello @kartik, When you define this route: Route::get('events/{id}/remind', [ 'as' ...READ MORE

Nov 12, 2020 in Laravel by Niroj
• 82,880 points
506 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
473 views
0 votes
1 answer

How to get a list of registered route paths in Laravel?

Hello, Route::getRoutes() returns a RouteCollection. On each element, you can ...READ MORE

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

How to include csrf_token() in an external js file in Laravel?

Hello @kartik, add <meta> tag with the token to the ...READ MORE

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

Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

Hello @kartik, set MAIL_ENCRYPTION= in .env file. and it worked fine ...READ MORE

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

How to get a variable name as a string in PHP?

Hello @kartik, You can use this: function varName( $v ...READ MORE

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

How to Check for a Specific Type of Object in PHP?

Hello @kartik, Use: bool is_a ( object $object ...READ MORE

Oct 29, 2020 in Laravel by Niroj
• 82,880 points
765 views
0 votes
1 answer

What is the use of the Eloquent cursor() method in Laravel?

Hello, The cursor method allows us to iterate ...READ MORE

Mar 20, 2020 in Laravel by Niroj
• 82,880 points
10,372 views
0 votes
1 answer

Error: Class 'TestCase' not found in D:\xampp\htdocs\laravel\app\tests\ExampleTest.php on line 3 ,

Hello @kartik, Run following command in your project's ...READ MORE

Sep 28, 2020 in Laravel by Niroj
• 82,880 points
2,020 views
0 votes
1 answer

How to remove composer sdk from laravel packages

Use  two blade page,one for create and other ...READ MORE

Oct 15, 2020 in Laravel by Niroj
• 82,880 points
1,226 views
0 votes
1 answer

How can I specify the required Node.js version in package.json?

Hello @kartik, I think you can use the ...READ MORE

Jul 20, 2020 in Laravel by Niroj
• 82,880 points
4,966 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

Oct 29, 2020 in Laravel by Niroj
• 82,880 points
584 views
0 votes
1 answer

How to create a laravel hashed password?

Hii @kartik, Hashing A Password Using Bcrypt in Laravel: $password ...READ MORE

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

Using Artisan::call() to pass non-option arguments

Hello @kartik, Use: Artisan::call('db:migrate', ['' => 'mymigration', '--table' => ...READ MORE

Sep 28, 2020 in Laravel by Niroj
• 82,880 points
1,742 views
0 votes
1 answer

What is reverse routing in Laravel?

 Laravel reverse routing is generating URL's based ...READ MORE

Mar 17, 2020 in Laravel by Niraj
10,124 views
0 votes
1 answer

How to create Eloquent model with relationship?

Hello @kartik, First, you have to create relation ...READ MORE

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

How to Install Laravel without using Composer?

Hello @kartik, If you really wanted to, you ...READ MORE

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

How to run specific migration in laravel?

Hello @kartik, Use this command: php artisan migrate --path=/database/migrations/my_migration.php  And ...READ MORE

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

How to get all pending jobs in laravel queue on redis?

Hello @kartik, Here is the way I do ...READ MORE

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

Error:Swift_TransportException Expected response code 220 but got code "", with message ""

Hello @kartik, This problem can generally occur when ...READ MORE

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

Error:Composer Out of memory in Laravel?

Hey @kartik, This Error  happens in almost all ...READ MORE

Mar 30, 2020 in Laravel by Niroj
• 82,880 points
9,225 views
0 votes
1 answer

How to getting the location from an IP address?

Hello @kartik, You could download a free GeoIP ...READ MORE

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

How could i create carbon object from given datetime structure?

Hello @kartik, Use Carbon::parse('2020-09-25 14:26');, it will return a Carbon object. Hope it ...READ MORE

Sep 25, 2020 in Laravel by Niroj
• 82,880 points
1,351 views
0 votes
1 answer

Laravel Pagination links not including other GET parameters

Hello @kartik, I think you should use this ...READ MORE

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

Error:ErrorException in Filesystem.php

Hello @kartik, Try this: chmod -R gu+w storage chmod -R ...READ MORE

Sep 25, 2020 in Laravel by Niroj
• 82,880 points
1,273 views
0 votes
1 answer

How can I query raw via Eloquent?

Hello @kartik, You may try this: // query can't ...READ MORE

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

How change view folder in Laravel5?

Hello @kartik, See line 16 of config/view.php (the "View Storage ...READ MORE

Sep 25, 2020 in Laravel by Niroj
• 82,880 points
932 views
0 votes
0 answers

How do I access to a variable inside a function?

I mean,I have public class MyClass{ ...READ MORE

Sep 21, 2020 in Laravel by aakash
• 230 points

edited Sep 21, 2020 by Niroj 1,124 views
+1 vote
1 answer

Error:file_put_contents(meta/services.json): failed to open stream: Permission denied?

Hello @kartik, Below steps helped me fix the ...READ MORE

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

How to generating a random password in php?

Hello @kartik, Try this (use strlen instead of count, because count on a ...READ MORE

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

How to only use created_at in Laravel?

Hello @kartik, Eloquent does not provide such functionality ...READ MORE

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

Error:ReflectionException: Class ClassName does not exist - Laravel

Hello @kartik, Perform a composer update, then composer dump-autoload. If the ...READ MORE

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

How can we allow the funtion to have access to $slug?

Hello @kartik, You have to use use to pass variables ...READ MORE

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

How can I build a condition based query in Laravel?

Hello @kartik, Try this: $query = DB::table('node'); if ($published == ...READ MORE

Sep 28, 2020 in Laravel by Niroj
• 82,880 points
521 views
0 votes
1 answer

How to perform a delete operation on a Model?

Hello @kartik, You can put this code for ...READ MORE

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

Error:“The page has expired due to inactivity” - Laravel 5.5

Hello @kartik, Make sure you have already added ...READ MORE

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

How to populating a database in a Laravel migration file?

Hello @kartik, Don't put the DB::insert() inside of ...READ MORE

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

Error: “No scheduled commands are ready to run.” in Laravel?

Hello @kartik, Run php artisan and see if your commands ...READ MORE

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

How to get client IP address in Laravel >5?

Hello @kartik, Use request()->ip(). Since Laravel 5 it's advised/good practice ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,880 points
614 views
0 votes
0 answers

I am unable to send emails on my php script

I am unable to send emails from ...READ MORE

Sep 6, 2020 in Laravel by Titus
• 160 points

recategorized Sep 6, 2020 by Niroj 851 views
0 votes
1 answer

How to pass data to view in Laravel?

Hello @kartik, You can pass data to the ...READ MORE

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

How do I catch exceptions / missing pages in Laravel 5?

Hello @kartik, In Laravel 5 you can catch ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,880 points
1,836 views