Latest questions in Laravel

0 votes
1 answer

How to display errors on laravel?

Hello @kartik, I had a problem with the ...READ MORE

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

Error:The Response content must be a string or object implementing __toString(), "boolean" given.

Hello @kartik, Your response must return some sort ...READ MORE

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

How to update a pivot table using Eloquent in laravel 5?

Hello @kartik, The code below solved my problem: $messages ...READ MORE

Sep 24, 2020 in Laravel by Niroj
• 82,880 points
4,108 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
990 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,632 views
0 votes
1 answer

Error:Object of class Illuminate\Database\MySqlConnection could not be converted to string

Hello @kartik, The use keyword is what you need: $id = ...READ MORE

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

How to set .env values in laravel programmatically on the fly?

Hello @kartik, Since Laravel uses config files to ...READ MORE

Sep 24, 2020 in Laravel by Niroj
• 82,880 points
4,628 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,088 views
+1 vote
1 answer

Laravel Error: 419 session expired

Hello @kartik, To fix the Laravel error 419 session ...READ MORE

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

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

Hello @kartik, You need to import your model ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,880 points
4,910 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
592 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,187 views
0 votes
1 answer

How to select count with Laravel's fluent query builder?

Hello @kartik, You can use an array in ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,880 points
16,417 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
487 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,151 views
0 votes
1 answer

How to get the id when you're validating in the model Validation unique on update using laravel?

Hello @kartik, in Laravel's inbuilt auth system, the ...READ MORE

Sep 11, 2020 in Laravel by Niroj
• 82,880 points
6,309 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,922 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 837 views
0 votes
1 answer

I get this error > Trying to get property of non-object . How to fix it?

Hello @aakash, If you want to save grades ...READ MORE

Aug 17, 2020 in Laravel by Niroj
• 82,880 points
23,277 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,667 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,692 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,802 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,880 points
1,739 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,827 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,375 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,818 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,034 views
0 votes
1 answer

How do I get HTTP Request body content in Laravel?

Hello @kartik, Inside controller inject Request object. So ...READ MORE

Aug 11, 2020 in Laravel by Niroj
• 82,880 points
16,436 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

Aug 11, 2020 in Laravel by Niroj
• 82,880 points
6,950 views
+1 vote
1 answer

How to get public directory in laravel?

Hello @kartik, Use public_path() For reference: // Path to the project's ...READ MORE

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

Error:Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory

Hello @kartik, The best way to solve this ...READ MORE

Aug 10, 2020 in Laravel by Niroj
• 82,880 points
6,091 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,880 points
894 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,655 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,921 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,483 views
0 votes
2 answers

Error:Composer: file_put_contents(./composer.json): failed to open stream: Permission denied

I used sudo and it managed to ...READ MORE

Nov 2, 2020 in Laravel by anonymous
46,840 views
0 votes
1 answer

How to use API Routes in Laravel?

Hello @kartik, You call it by http://localhost:8080/api/test ...READ MORE

Aug 10, 2020 in Laravel by Niroj
• 82,880 points
7,325 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,732 views
0 votes
1 answer

How to validate array in Laravel?

Hello @kartik, you can call validate() method directly ...READ MORE

Aug 10, 2020 in Laravel by Niroj
• 82,880 points
30,678 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,880 points
994 views
+1 vote
1 answer

How can I run specific migration in laravel?

Hello @kartik, Use this command it worked for ...READ MORE

Aug 4, 2020 in Laravel by Niroj
• 82,880 points
21,560 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,880 points
1,140 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,930 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,069 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,493 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,880 points
701 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,779 views
0 votes
1 answer

Error:Laravel - Session store not set on request

Hello @kartik, You'll need to use the web middleware if ...READ MORE

Aug 4, 2020 in Laravel by Niroj
• 82,880 points
26,632 views