Trending questions in Laravel

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,840 points
790 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,840 points
643 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,840 points
905 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 1,170 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,840 points
848 views
0 votes
1 answer

How to get current path of a Request with its query parameters?

Hello @kartik, Try to use the following: \Request::getRequestUri() Hope this ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,840 points
2,160 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,840 points
2,130 views
0 votes
1 answer

Error:login in Laravel. How to solve?

Hey, First check if your model login has a field password in ...READ MORE

Mar 26, 2020 in Laravel by Niroj
• 82,840 points
7,978 views
0 votes
1 answer

Error:PHP mail function doesn't complete sending of e-mail

Hello @kartik, If you are using an SMTP ...READ MORE

Jul 30, 2020 in Laravel by Niroj
• 82,840 points
2,522 views
0 votes
1 answer

How to use multiple databases in Laravel?

Hello @kartik, Laravel has inbuilt support for multiple ...READ MORE

Jul 30, 2020 in Laravel by Niroj
• 82,840 points
2,448 views
0 votes
1 answer

How to set a new value for data-url attribute using jquery?

Hii, In your line: $(this).attr('data-url',value.url); are you sure this refers to the ...READ MORE

Apr 14, 2020 in Laravel by Niroj
• 82,840 points
7,041 views
0 votes
1 answer

How do I set up phpMyAdmin on a Laravel Homestead box?

Hello, Step 1: Go to the phpMyAdmin website, download the latest ...READ MORE

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

How to import a mysql dump to a laravel migration?

Hello @kartik You can import dumps in Laravel ...READ MORE

Apr 3, 2020 in Laravel by Niroj
• 82,840 points
7,344 views
0 votes
1 answer

How to access url for the current if statement of laravel?

Hello @ subham , If you want to access the ...READ MORE

Aug 7, 2020 in Laravel by Niroj
• 82,840 points
1,591 views
0 votes
1 answer

How can I echo the version of the current Laravel version in php using the view?

Hello @kartik, This is the way how to ...READ MORE

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

How to install Laravel's Artisan?

Hello @kartik, Artisan comes with Laravel by default, ...READ MORE

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

How can someone change the default database type in Laravel?

Laravel is configured to use MySQL by ...READ MORE

Mar 20, 2020 in Laravel by Niroj
• 82,840 points
7,042 views
0 votes
1 answer

How to Make Laravel Eloquent “IN” Query?

Hello @kartik, Here is how you do in ...READ MORE

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

Artisan migration error “Class 'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver' not found”?

Hello @kartik, This message shows up if you ...READ MORE

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

How to mock a static facade methods in Laravel?

Hey, Facades provide a "static" interface to classes ...READ MORE

Mar 19, 2020 in Laravel by Niroj
• 82,840 points
6,749 views
0 votes
1 answer

How to sync props to state using React hooks : setState()?

Hello @kartik, useState hooks function argument is being used ...READ MORE

Jun 1, 2020 in Laravel by Niroj
• 82,840 points
3,553 views
0 votes
1 answer

Constructor redirect is not working in Laravel?

Hello, vent with Illuminate\Routing\Redirector, laravel set redirect in ...READ MORE

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

How to echo to console in Laravel and Artisan?

Hello @kartik, You can try this as this ...READ MORE

Apr 3, 2020 in Laravel by Niroj
• 82,840 points
5,871 views
0 votes
1 answer

Class ClassName does not exist:ReflectionException in Laravel?

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

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

What is service provider in Laravel?

Hey, Service providers can be defined as the ...READ MORE

Mar 20, 2020 in Laravel by Niroj
• 82,840 points
6,044 views
0 votes
1 answer

Why soft deleted entities appear in query results?

Hello @kartik, Sometimes, you will get the soft deleted table ...READ MORE

Apr 3, 2020 in Laravel by Niroj
• 82,840 points
5,317 views
0 votes
1 answer

How to use Stored Procedures in Laravel?

Hey, To create a Stored Procedure you can ...READ MORE

Mar 24, 2020 in Laravel by Niroj
• 82,840 points
5,266 views
0 votes
1 answer

Where to register Facades & Service Providers in Lumen?

Hello, To register a facade with an alias, ...READ MORE

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

How to pass URL param in Laravel?

Hello, First you have to go to routes ...READ MORE

Mar 18, 2020 in Laravel by Niroj
• 82,840 points
5,322 views
0 votes
1 answer

Why it is necessary to refresh CSRF token per form request?

Hello, Generating a new CSRF token for each ...READ MORE

Mar 19, 2020 in Laravel by Niroj
• 82,840 points
4,856 views
0 votes
1 answer

.How to turn off CSRF protection for a particular route in Laravel?

Hey, We can add that particular URL or ...READ MORE

Mar 24, 2020 in Laravel by Niroj
• 82,840 points
4,475 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

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

How to make a constant and use globally in laravel?

Hii, You can create a constants.php page in config folder ...READ MORE

Mar 24, 2020 in Laravel by Niroj
• 82,840 points
4,309 views
0 votes
1 answer

How to get data from Laravel backend and display in Vue/Nuxt frontend

Hello, You have to use the package dotenv. Then ...READ MORE

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

How to enable or disable maintenance mode in Laravel?

Hii, We have to use the following artisan ...READ MORE

Mar 24, 2020 in Laravel by Niroj
• 82,840 points
4,083 views
0 votes
0 answers

Error:DataTables wont show results : “Ajax Error” and “500 Internal Server Error”

I'm new to Laravel PHP Framework and currently continue ...READ MORE

Apr 15, 2020 in Laravel by kartik
• 37,520 points
2,818 views
0 votes
1 answer

What is the difference between Facades and Dependency Injection in Laravel?

Hello, The main differnece between them is explained ...READ MORE

Mar 26, 2020 in Laravel by Niroj
• 82,840 points
3,548 views
0 votes
1 answer

How to identify wheather the request is HTTP GET or HTTP POST in Laravel?

Hey, In order to identify the type of ...READ MORE

Mar 19, 2020 in Laravel by Niroj
• 82,840 points
3,453 views
0 votes
1 answer

How to install Laravel via composer?

Hello, This is simple you just need to ...READ MORE

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

How to change Laravel official name to any customize name?

Hey, You just need to go Laravel folder through ...READ MORE

Mar 17, 2020 in Laravel by Niroj
• 82,840 points
3,302 views
0 votes
1 answer

Error “ETXTBSY: text file is busy” on npm install

Hello, 1.Make sure to update node to latest ...READ MORE

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

How to connect to mysql with laravel?

Hello, Laravel makes it very easy to manage ...READ MORE

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

What is the significant difference between insert() and insertGetId() function in Laravel?

Hello, Insert(): This function is simply used to ...READ MORE

Mar 17, 2020 in Laravel by Niroj
• 82,840 points
3,233 views
0 votes
1 answer

What is redirection in Laravel?

Named route is used to give specific ...READ MORE

Mar 18, 2020 in Laravel by Niroj
• 82,840 points
3,167 views
0 votes
1 answer

Getting the query builder to output its raw SQL query as a String?

Hello, DB::QueryLog() only work after you execute the query $builder->get(). ...READ MORE

Mar 30, 2020 in Laravel by Niroj
• 82,840 points
2,603 views
0 votes
1 answer

How to enable query log in Laravel?

Hello, You can use simple function that is ...READ MORE

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

What is middleware? How can we register middeleware in Laravel?

Middleware acts as a bridge between a ...READ MORE

Mar 18, 2020 in Laravel by Niroj
• 82,840 points
2,910 views
0 votes
1 answer

How can we use the custom table in Laravel?

Hey, We can easily use custom table in ...READ MORE

Mar 20, 2020 in Laravel by Niroj
• 82,840 points
2,724 views
0 votes
1 answer

What are the important directories used in a common Laravel application

Hey @Kartik. Directories used in a common Laravel ...READ MORE

Mar 17, 2020 in Laravel by Niroj
• 82,840 points
2,760 views
0 votes
1 answer

What is database migration and how to create database migration in Laravel?

Hii, Migrations are like version control for your database, ...READ MORE

Mar 23, 2020 in Laravel by Niroj
• 82,840 points
2,485 views