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
8
votes
2 answers

Laravel 5.6 - get changed values after updateOrCreate

I have used laravel 5.6 and used the updateOrCreate model to add or update some data. But I need to get all the values which changed $q=Userssub::updateOrCreate( ['userid' => $uid ], ['model' => $model] ); and the result shows like in…
menasoft
  • 135
  • 1
  • 2
  • 12
8
votes
2 answers

Custom (dynamic) log file names with laravel5.6

With laravel 5.5 we had access to configureMonologUsing() method in $app which made it possible for things like this in bootstrap/app.php: $app->configureMonologUsing(function (Monolog\Logger $monolog) { $processUser =…
fab2s
  • 838
  • 2
  • 8
  • 14
8
votes
1 answer

Laravel 5.6 getRouteKeyName() not working

This is the code I have so far: Web.php Route::get('/{uri}', 'PageController@show')->name('page.show'); PageController // Show the requested page public function show(Page $page) { return view('templates.page', compact('page')); } Page…
Danny Guest
  • 93
  • 1
  • 4
8
votes
3 answers

How to select the order of external Providers in Laravel 5.6?

I need prioritize the project routes vs the packages routes in Laravel 5.6.12. I've read that one solution could be placing the RouteServiceProvider call before than the packages call. All right, but defaultly, when I install with composer the…
Jose Aragon
  • 81
  • 1
  • 3
7
votes
5 answers

Retrieve fillable fields in Laravel

In laravel 5.4, I'm able to retrieve fillable fields by using fillable index of model instance. $model = new AnyClass(); dd($model['fillable']); The above code prints all fillable fields of AnyClass. But the same code prints null on laravel 5.6. I…
Vidhyut Pandya
  • 1,605
  • 1
  • 14
  • 27
7
votes
1 answer

How to troubleshoot Laravel Broadcasts + Pusher..?

I'm following the Laravel Documentation to set up broadcasting using Pusher, and it looks pretty straight-forward, but I haven't gotten it work yet, so I must have made a mistake somewhere along the way. Here's what I've done: Server Side I've…
BizzyBob
  • 12,309
  • 4
  • 27
  • 51
7
votes
1 answer

Laravel Nova - Display text area content without option show content

I would like to display text area resource field content always without showing option "Show Content" or display it by default. Is it possible?
Saumini Navaratnam
  • 8,439
  • 3
  • 42
  • 70
7
votes
1 answer

Laravel mix - Versioning does not work

I'm working on a fresh project using Laravel 5.6 using laravel-mix@2.1.14. When I compile my assets using npm run production, they are not suffixed like they should Note Even when removing the if mix.inProduction() the versioning does not…
Léo Coco
  • 4,022
  • 11
  • 52
  • 97
7
votes
3 answers

Laravel 5.6 Access auth()->user() in controller constructor?

I am trying to access auth()->user() in controller constructor, but it always return null. I have tried below, but no luck! protected $user; function __construct() { $this->middleware(function ($request, $next) { $this->user =…
Kalim
  • 487
  • 6
  • 18
7
votes
3 answers

How can I convert array two dimensional to collection laravel?

I have array like this : $test = array( array( 'name' => 'Christina', 'age' => '25' ), array( 'name' => 'Agis', 'age' => '22' ), array( 'name' => 'Agnes', 'age' => '30' …
moses toh
  • 12,344
  • 71
  • 243
  • 443
7
votes
5 answers

Laravel return view on middleWare

in laravel i'm trying to check user active column and if its 0 then must be show simple view as your account is disable, after implementing below codes i get this error: my middleware: class CheckUserActive { public function handle($request,…
DolDurma
  • 15,753
  • 51
  • 198
  • 377
7
votes
3 answers

How to fetch data with relationship using VueJs + Laravel

How can I show the user name in my table using vuejs ? I have my users and posts table with the relationships set. A user has many posts and a post belongs to a user. In my Posts.vue template I can now show the post table data:
Sidney Sousa
  • 3,378
  • 11
  • 48
  • 99
7
votes
2 answers

Laravel groupBy is not working throwing error Syntax error or access violation: 1055

I have tried solutions in other questions but that is not solving my issue. I have made strict from true to false. Used modes 'modes' => [ 'STRICT_TRANS_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', …
zahid hasan emon
  • 6,023
  • 3
  • 16
  • 28
7
votes
2 answers

Laravel: How to create correct routes group for localization?

Now I write sample routes without grouping for localization my Laravel project : Route::get('/{lang?}', function($lang=null){ App::setlocale($lang); return view('welcome'); }); How I can create group of routes correctly for more one…
Andreas Hunter
  • 4,504
  • 11
  • 65
  • 125
7
votes
2 answers

How can I validation object string with validation laravel?

I use laravel 5.6 I use https://laravel.com/docs/5.6/validation#form-request-validation to validation server side My controller like this :
moses toh
  • 12,344
  • 71
  • 243
  • 443