Questions tagged [laravel-5.4]

Laravel 5.4 is a past version of the open-source PHP web framework replaced by 5.5 version created by Taylor Otwell. It was released on January 24, 2017. Use it in addition to the laravel-5 tag if your question is specific to Laravel 5.4. Use the laravel tag for general laravel related questions.

What is new:

  • Markdown Mail & Notifications
  • Laravel Dusk - BrowserKit testing replaced with ChromeDriver
  • Laravel Mix replaces Laravel Elixir
  • Blade Components & Slots
  • Implicit model binding for broadcast channels
  • Collection Higher Order Messages
  • Object Based Eloquent Events
  • Job Level Retry & Timeout
  • Request Sanitization Middleware
  • Realtime Facades
  • Custom Pivot Table Models
  • Improved Redis Cluster Support

Resources:

Other notable tags:

4188 questions
12
votes
3 answers

Call to undefined method Illuminate\Notifications\Notification::send()

I am trying to make a notification system in my project. These are the steps i have done: 1-php artisan notifications:table 2-php artisan migrate 3-php artisan make:notification AddPost In my AddPost.php file i wrote this…
Mohamed Wannous
  • 181
  • 1
  • 2
  • 11
12
votes
3 answers

Can't catch exceptions in laravel

I have the following situation: try { DB::beginTransaction(); $task = new Task(); $task->setTracker(""); //thrown \Symfony\Component\Debug\Exception\FatalThrowableError DB::commit(); }catch…
SexyMF
  • 10,657
  • 33
  • 102
  • 206
12
votes
4 answers

Property exists but property_exists() return false;

Well I'm really confused. When i check if a property exists it returns false. if (property_exists($pais, 'id')) // false but when I debug it shows me it's there. print_r($pais->id); // 1 print_r(property_exists($pais, 'id')); // false Am I crazy…
Danilo Kobold
  • 2,562
  • 1
  • 21
  • 31
12
votes
4 answers

Laravel dependency injection not working

I'm using resource controllers in my laravel app and I'm trying to use dependancy injection but it's not working on a particular model and controller. This works: /** * Display the specified resource. * * @param \App\Booking $booking * @return…
IainChambers
  • 368
  • 2
  • 10
12
votes
3 answers

Command "tinker" is not defined

After upgrade from 5.3 to 5.4, Follow the instructions: In order to continue using the tinker Artisan command, you should also install the laravel/tinker package: composer require laravel/tinker Once the package has been installed, you should…
Oscar Romero
  • 231
  • 1
  • 2
  • 11
12
votes
4 answers

How to use bootstrap 4 in Laravel 5.4?

I installed bootstrap 4 using npm on my laravel app. But I think bootstrap 3 working behind not bootstrap 4. using command: npm install npm install bootstrap@4.0.0-alpha.6 Did I left something to do? Or do I need to manually import bootstrap to…
LogicalAnt
  • 907
  • 3
  • 12
  • 28
11
votes
1 answer

Laravel logs in Heroku not showing up

I've deployed a Laravel app to heroku by following the official guide. It says to change APP_LOG=errorlog, which I've done. I've also tried two different versions of this, the commented line being the…
Kevin Redman
  • 459
  • 4
  • 15
11
votes
5 answers

How to set root/base url for a laravel-vujs project?

I've deployed a VueJS project to a domain like www.example.com/demos/app, But when I send a request to api from axios it is pointing to www.example.com/login instead of www.example.com/demos/app/login Here is my request code using axios export…
Naresh
  • 862
  • 3
  • 12
  • 35
11
votes
2 answers
11
votes
1 answer

PHP Artisan Tinker not working with Laravel 5.4 and PHP 7.0.1

I just added tinker to my Laravel project 5.4. When I try to run: php artisan tinker I am getting following error: PHP Warning: Uncaught ErrorException: require(/home/abdullah/php_apps/website): failed to open stream: Success in…
AMBasra
  • 969
  • 8
  • 24
11
votes
5 answers

Is starting route grouping with namespace() not allowed in Laravel 5.4?

Using Laravel 5.4, indeed in the documentation about Route grouping, and an example as this was given about namespacing: Route::namespace('Admin')->group(function () { // Controllers Within The "App\Http\Controllers\Admin" Namespace }); This…
11
votes
2 answers

laravel 5.4 : cant access Auth::user() in the __construct method

In previous versions of Laravel, in the controllers which I needed to access logged user in all the methods I used to do something like this: class DashboardController extends Controller { private $user ; function __construct(Request…
hretic
  • 999
  • 9
  • 36
  • 78
11
votes
2 answers

axios preflight fail error 301 using vue.js

I've got a Laravel 5.4 API, that works fine in Postman and the Browser. Localhost works fine- Laravel 5.4 is running on one port, and Vue in hot deploy mode is running fine. However, when I move the Vue code to my production server I get this…
Anthony
  • 487
  • 1
  • 6
  • 21
11
votes
2 answers

Facebook Logout from my website in Laravel

When I click on logout... I get this exception in console: FB.logout() called without an access token. Question: I already have Access token saved in Session and I have access to it in Client side also. I already checked this answer and could not…
Pankaj
  • 9,749
  • 32
  • 139
  • 283
11
votes
4 answers

Laravel - Type error: Too few arguments?

I get an error: Type error: Too few arguments I thought Laravel do some magic to if arguments is not fully passed? For example: In the Controller I have: public function create(CreateRequest $request) { return…
I'll-Be-Back
  • 10,530
  • 37
  • 110
  • 213