Questions tagged [laravel-5.6]

Laravel 5.6 is a previous version of the open-source PHP web framework created by Taylor Otwell. It was released on February 7, 2018. Use it in addition to the laravel-5 tag if your question is specific to Laravel 5.6. Use the Laravel tag for general Laravel related questions.

Laravel 5.6 is a previous version of Laravel 5. It was released on February 7, 2018.

What is new:

  • Logging Improvements
  • Single Server Task Scheduling
  • Dynamic Rate Limiting
  • Broadcast Channel Classes
  • Model Serialization Improvements
  • Argon2 Password Hashing
  • Collision (Pretty CLI Output)
  • Bootstrap 4

Resources:

1859 questions
10
votes
6 answers

upload image to ckeditor in laravel Incorrect server response

i am trying to upload image through ckeditor 4 when i press send it the server getting this Error Incorrect Server Response here is my controller public function mediauploadpost(Request $request){ $CKEditor = $request->input('CKEditor'); …
Sid Heart
  • 743
  • 3
  • 14
  • 38
10
votes
3 answers

How can I check if collection empty in view blade laravel?

If I dd($items); in the controller, the result like this : In the view blade laravel I check if collection empty like this : @if($items) ... @endif But it does not work How can I solve this problem?
moses toh
  • 12,344
  • 71
  • 243
  • 443
10
votes
3 answers

Laravel eloquent mutators not work on update data

I have in my model accessors and mutators for hash/rehash data in database table fields. For example: public function setFullNameAttribute($value) { $this->attributes['full_name'] = Helper::geted('encrypt', $value); } public function…
Andreas Hunter
  • 4,504
  • 11
  • 65
  • 125
10
votes
4 answers

Want to implement web sockets in Laravel

I want to implement web notifications in Laravel using web sockets. I have tried pusher. It is very easy but it is a paid package. I have also tried redis and socket.io for which I have to install horizon. I am running Windows and I cannot install…
Pranav Mandlik
  • 644
  • 6
  • 19
  • 45
10
votes
1 answer

How to downgrade in Laravel Framework? (5.6 to 5.5)

I have a project which is done with Laravel 5.6. But My current server doesn't have php 7.1 installed yet. How is it possible to downgrade to Laravel 5.5?
Mahesh Samudra
  • 1,039
  • 1
  • 11
  • 25
10
votes
1 answer

Where I can see the logs in Google App Engine?

I am new to GAE, and hence this question may be very easy for the experts in GAE. I have Flexible App Engine, SQL instance of MySQL 2nd Gen 5.7 I have hosted my laravel app on the GAE, and after following the tutorial: Run Laravel on Google App…
9
votes
1 answer

Location of auth:api Middleware

Can somebody please tell the location of auth:api middleware? As per the auth:api middleware, the api routes are protected by not null users. I have a boolean field in user table called Is_Admin_Url_Accessible. I want to add a condition in the…
Pankaj
  • 9,749
  • 32
  • 139
  • 283
9
votes
4 answers

Laravel Passport Multiple Authentication using Guards

Can we use laravel passport with different guards to authenticate APIs for two different types of users. For example we have driver app for driver user and vendor app for vendor user. Both have their different models Driver and Vendor. How can we…
9
votes
4 answers

Laravel 5 WebPack JQuery - $ is not defined

I Have webpack.min.js: mix.webpackConfig(webpack => { return { plugins: [ new webpack.ProvidePlugin({ $: 'jquery', jQuery: 'jquery', 'window.jQuery': 'jquery', …
AnD
  • 3,060
  • 8
  • 35
  • 63
9
votes
4 answers

Laravel add custom middleware to route group

in my web application i have admin panel and i'm trying to make access to users that they have admin role by this code: namespace App\Http\Middleware; use Closure; class CheckUserAdminRole { public function handle($request, Closure $next) { …
DolDurma
  • 15,753
  • 51
  • 198
  • 377
9
votes
1 answer

Prevent action from Laravel observer events

I would like to know how an action could be prevented on a model observer, for example: $model->update(['foo' => 'bar']); In the observer public function updating(Model $model) { if($model->isDirty('foo') { // Prevent action from…
Asur
  • 3,727
  • 1
  • 26
  • 34
9
votes
2 answers

log to stdout / stderr with Laravel 5.6 and php-fpm

I want my laravel applications to run as well mannered 12 factor apps. Right now I'm struggling to get their to logs to and from stdout (stderr is also fine by me) under php-fpm. The php version is 7.2.1, the laravel version is 5.6.3. I configured…
tback
  • 11,138
  • 7
  • 47
  • 71
8
votes
4 answers

How to change column data type in laravel 5.6?

I am trying to change column data type using laravel 5.6. I have a table in which two columns have a data type of text but I would like to change it to longtext. I have tried following: executed composer require doctrine/dbal executed composer…
Imran Abbas
  • 755
  • 1
  • 7
  • 24
8
votes
2 answers

Laravel Nova card localization

I'm trying to add localization support for a card built for the Laravel Nova dashboard. I already created a folder in /resources/lang containing the JSON language files in a format like en.json. The files get published (copied) with the publish…
Sven
  • 1,450
  • 3
  • 33
  • 58
8
votes
1 answer

Laravel defining a many-to-many relationship with the same table

So I have a posts table with a corresponding Post model. I want to have related posts for every post. Since a post can have many other related posts, it is a many-to-many relationship between the posts table and the posts table (same table). So I…
Awa Melvine
  • 3,797
  • 8
  • 34
  • 47