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
72
votes
10 answers

Laravel mysql migrate error

I recently format my mac book pro, after cloning the proyect from github and install the things I need like MySql and Sequel Pro I tried to migrate the database information but I get this error: Illuminate\Database\QueryException :…
Julian Mendez
  • 3,162
  • 2
  • 13
  • 36
44
votes
10 answers

Laravel 5.6 Upgrade caused Logging to break

Heey! So I've recently been given the task to take a Laravel 5.2 up to 5.6. It seemed to be fine...until I tried to do a \Log::info(). Every time I run that, I get a big error, but at the end, it still prints to the log. I saw the 5.6 documentation…
cbloss793
  • 1,555
  • 4
  • 19
  • 30
37
votes
12 answers

Upgrading Laravel 5.5 to 5.6 error

I am trying to upgrade my Laravel 5.5 to 5.6. I have followed the instructions from the laravel website, yet I got this error: Your requirements could not be resolved to an installable set of packages. Problem 1 - The requested package…
Candy
  • 401
  • 1
  • 4
  • 9
36
votes
8 answers

Laravel 5.6 - Pass additional parameters to API Resource?

A Laravel API Resource can be either a single resource or a collection. In some cases, additional parameters are required to be passed to the resource/collection from the controller. Below is a simple example demonstrating the issue using User as a…
Wonka
  • 8,244
  • 21
  • 73
  • 121
30
votes
1 answer

What is the meaning of Eloquent's Model::query()?

Can anyone please explain in detail what Eloquent's Model::query() means?
Shateel Ahmed
  • 1,264
  • 2
  • 12
  • 23
29
votes
5 answers

Laravel 5.6 TrustedProxies error

I've upgraded from L5.5 to L5.6 today (updating Symfony components to v4 in the process). Also I've updated fideloper/proxy package to 4.0 as of official Laravel 5.6 upgrade guide. After that I starts to getting this error: Type error: Argument 2…
SkifAlef
  • 292
  • 1
  • 3
  • 9
28
votes
4 answers

Laravel Error "Class 'App\Http\Controllers\DateTime' not found"

public function recover(Request $request){ $email = $request->input('email'); // Create tokens $selector = bin2hex(random_bytes(8)); $token = random_bytes(32); $url = sprintf('%s', route('recover.reset',['selector'=>$selector,…
myckhel
  • 800
  • 3
  • 15
  • 29
28
votes
5 answers

Vue js triggering a method/function every x seconds

The title pretty much explains it, but i am looking to fire of a function every second. I haven't tried anything, nor do i have much code that would be useful. I have done some googling around and so far had n joy with any examples. Also, i am using…
The-WebGuy
  • 877
  • 5
  • 12
  • 25
27
votes
3 answers

How to remove unique constraint from a column using Laravel migrations?

I have to remove a unique constraint from an email column using Laravel migrations. Here is my code: class AlterEmailToUsers extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('users',…
aishazafar
  • 1,024
  • 3
  • 15
  • 35
19
votes
8 answers

How do I setup and use Laravel Scheduling on AWS Elastic Beanstalk?

Scenario As a fairly new user of Laravel and Elastic Beanstalk I soon found my self in the need to schedule operations, like most of us do. In the past I had always used simple crontab scheduling for this. So now I stood before a list of…
19
votes
2 answers

Laravel 5.6 - How to get auth()->user() or $response->user() in api controller?

In api.php routes file below, there are public routes and private routes: Route::group(['namespace' => 'API'], function() { // Public routes (auth not required) Route::group([], function() { Route::get('/testauth1',…
Wonka
  • 8,244
  • 21
  • 73
  • 121
18
votes
3 answers

Laravel: How to authenticate users without DB

As the title suggests, is it possible to authenticate without DB (instead, using User Provider)? I've seen posts about how to authenticate without password, but would it be ever possible to authenticate without DB? Here is what I've been trying to…
Hiroki
  • 3,893
  • 13
  • 51
  • 90
17
votes
4 answers

Laravel 5.6 time ago in views

user10070358
16
votes
5 answers

How to validate without request in Laravel

I need to validate an array but without a request. In laravel docs validation is described like this: $validator = Validator::make($request->all(), [ 'title' => 'required|unique:posts|max:255', 'body' => 'required', ]); But I can't use …
user3743266
  • 1,124
  • 4
  • 16
  • 28
15
votes
2 answers

How can I use whereHas in the morphTo relation laravel?

My product model like this : morphMany(Favorite::class, 'favoritable'); …
moses toh
  • 12,344
  • 71
  • 243
  • 443
1
2 3
99 100