Trending questions in Laravel

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
13,564 views
+1 vote
1 answer

How to make anchor tag with routing using Laravel?

Hey @kartik, First you have to go to ...READ MORE

Mar 18, 2020 in Laravel by Niroj
• 82,880 points
21,914 views
0 votes
2 answers

Error:Failed to open stream: Permission denied in Laravel?

I had this problem lately with my ...READ MORE

Nov 4, 2020 in Laravel by anonymous
• 140 points
16,373 views
0 votes
1 answer

How to change value of a request parameter in laravel?

Hello @kartik, Use merge(): $request->merge([ 'user_id' => ...READ MORE

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

How to do update query on laravel fluent using db::raw?

Hello @kartik, Code row updates like this: ...->update( array( ...READ MORE

Sep 24, 2020 in Laravel by Niroj
• 82,880 points
12,826 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,488 views
0 votes
1 answer

How to Decode Json object in laravel and apply foreach loop on that in laravel?

Hello @kartik, you can use json_decode function foreach (json_decode($response) as $area) { ...READ MORE

Sep 30, 2020 in Laravel by Niroj
• 82,880 points
12,167 views
0 votes
2 answers

Error:Class 'App\Http\Controllers\App\Model' not found?

Class ‘App\Http\Controllers\Auth’ Not Found in Class ‘App\Http\Controllers\Auth’ not ...READ MORE

Aug 6, 2020 in Laravel by pakainfo
17,073 views
0 votes
1 answer

How to alias a table in Laravel Eloquent queries using Query Builder?

Hello @kartik, You can use less code, writing ...READ MORE

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

How to exclude certains columns while using eloquent?

Hello @kartik, Using hidden array in model is good, but ...READ MORE

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

How to use patch request in Laravel?

Hello @kartik, Your route is: Route::patch('users/update', 'UsersController@update'); replace your route ...READ MORE

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

How can I use Guzzle to send a POST request in JSON?

Hello @kartik, For Guzzle 5, 6 and 7 you do ...READ MORE

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

How to validate Route Parameters in Laravel?

Hello @kartik, The issue is route parameters aren't ...READ MORE

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

How Can I Remove “public/index.php” in the URL Generated Laravel?

Hello @kartik, If it isn't already there, create ...READ MORE

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

How to access Session variables and set them in javascript?

Hello @kartik, Assigning the ASP.NET Session Variable using ...READ MORE

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

How to manually create a new empty Eloquent Collection in Laravel?

Hello @kartik, It's not really Eloquent, to add ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,880 points
12,370 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,850 views
0 votes
1 answer

How to get image from resources in Laravel?

Hello @kartik, You can make a route specifically ...READ MORE

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

How to redirect to login if user is not authenticated in laravel?

Hello @kartik, Use middleware for this purpose and ...READ MORE

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

How To Pass GET Parameters To Laravel From With GET Method ?

Hello @kartik, The simplest way is just to ...READ MORE

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

How to upload files in Laravel directly into public folder?

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

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

How to show old data of dynamic checkbox in Laravel?

Hello @kartik, This will work: ...READ MORE

Sep 30, 2020 in Laravel by Niroj
• 82,880 points
8,919 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
5,984 views
0 votes
1 answer

Error:Laravel Migration table already exists but i want to add new not the older

Hello @kartik, You need to run php artisan migrate:rollback if ...READ MORE

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

How do you get the path to the Laravel Storage folder?

Hello @kartik, In Laravel 3, call path('storage'). In Laravel 4, ...READ MORE

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

How can we Create Multiple Where Clause Query Using Laravel Eloquent?

Hii, You can use Conditions using Array: $users = User::where([ ...READ MORE

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

How to set port for php artisan.php serve in Laravel?

Hii @kartik, When we use the php artisan serve ...READ MORE

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

Error:My Routes are Returning a 404 in Laravel?

Hii @kartik Routes Use them to define specific routes ...READ MORE

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

How to unset or remove a collection element after fetching it?

Hello @kartik, You would want to use ->forget() $collection->forget($key); Hope it ...READ MORE

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

How to check if connected to database in Laravel?

Hello @kartik, You can use if(DB::connection()->getDatabaseName()) { echo ...READ MORE

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

Error:sending email via php mail function goes to spam

Hello @kartik, Try changing your headers to this: $headers ...READ MORE

Jul 30, 2020 in Laravel by Niroj
• 82,880 points
10,558 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,086 views
0 votes
1 answer

How to call a controller function inside a view in laravel 5

Hello @kartik, Just try this in your view ...READ MORE

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

How to gett selected values from a multiple select form in Laravel?

Hello @kartik, First, if you want to have ...READ MORE

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

How to access client ip address in Laravel 5?

Hello @kartik, You can use this type of ...READ MORE

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

What is with() in Laravel?

Hello, with() function is used to eager load in ...READ MORE

Mar 24, 2020 in Laravel by Niroj
• 82,880 points
15,712 views
0 votes
1 answer

Error:Non-static method Illuminate\Http\Request::all() should not be called statically, assuming $this from incompatible context

Hello @kartik, The error message is due to ...READ MORE

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

How to get the subdomain in a subdomain-route in laravel?

Hello, $subdomain is injected in the actual Route callback, it is ...READ MORE

Nov 2, 2020 in Laravel by Niroj
• 82,880 points
5,725 views
0 votes
1 answer

How can I serve a single HTML page from the Laravel public folder without having to use the .html extension?

Hello @kartik, You may rename the test folder ...READ MORE

Nov 12, 2020 in Laravel by Niroj
• 82,880 points
5,122 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
3,997 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,927 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,939 views
0 votes
1 answer

How to include a sub-view in Blade templates in Laravel?

Hello @kartik, You can use the blade template ...READ MORE

Mar 31, 2020 in Laravel by Niroj
• 82,880 points
14,571 views
0 votes
1 answer

Fatal error: Class 'App\Http\Controllers\Redirect' not found

Hello @kartik, The only thing that you have ...READ MORE

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

How to use GROUP_CONCAT in laravel?

Hello @kartik, You can use relations as query ...READ MORE

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

Error:The bootstrap/cache directory must be present and writable' error after update

Hello @kartik, Try this after you have run ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,880 points
8,817 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,648 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,520 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,730 views