Questions tagged [laravel-5.7]

Laravel 5.7 is the previous stable version of the open-source PHP web framework created by Taylor Otwell. It was released on September 4, 2018. Use it in addition to the [laravel-5] tag if your question is specific to Laravel 5.7. Use the [laravel] tag for general Laravel related questions.

Laravel 5.7 is the previous stable version of Laravel 5. It was released on September 4, 2018.

What is new:

  • Email Verification
  • Guest User Gates / Policies
  • Symfony Dump Server
  • Notification Localization
  • Console Testing
  • URL Generator & Callable Syntax
  • Paginator Links
  • Filesystem Read / Write Streams

Resources:

1390 questions
7
votes
2 answers

Displaying QR Code in PDF file, in Laravel

I'm facing a problem with displaying a QR code in a PDF file. When I try to display the QR code without PDF it works. The QR code is generated by https://github.com/SimpleSoftwareIO/simple-qrcode on to a pdf file generated by…
user12380208
  • 519
  • 7
  • 26
7
votes
3 answers

Getting current URI in Laravel 5.7

I am aware that in the previous versions of Laravel (e.g. 4), one could get the current uri through Route::current()->uri(); However, this doesn't seem to work in Laravel 5.7 or later. I am wondering how it should be rewritten. Please note that I…
Farzan Badakhshan
  • 373
  • 1
  • 5
  • 19
7
votes
2 answers

Endless Loop: Cannot find 'cross-spawn'

Problem I am stuck in a loop where running npm run watch says it cannot find cross-spawn. > @ watch /Users/donnie/Github/laravel_project > npm run development -- --watch > @ development /Users/donnie/Github/laravel_project > cross-env…
Donnie
  • 6,229
  • 8
  • 35
  • 53
7
votes
1 answer

"PHP Error: Call to a member function getKey() on string" from diff() method on Laravel Collection

Here are the dumped collections: //$collOne Illuminate\Database\Eloquent\Collection {#3386 #items: array:6 [ 4807 => "{"color_id":7,"size_id":4,"pack_id":null}" 4808 => "{"color_id":7,"size_id":2,"pack_id":null}" 4809 =>…
wheelmaker
  • 2,975
  • 2
  • 21
  • 32
7
votes
5 answers

Limit login attempts in Laravel 5.7

I have Laravel 5.7 project with custom login. How can I let Laravel accept three login attempts after that redirect for page waiting to 2 or 3 min, etc? public function loginPost(LoginRequest $request) { if (Auth::attempt(array('user_name' =>…
Awar Pulldozer
  • 1,071
  • 6
  • 23
  • 40
7
votes
7 answers

Laravel 5.7 - Verification email is not sent

I've upgraded my laravel instance from version 5.6 to version 5.7. Now I try to use the built-in email verification from laravel. My problem is that I don't get an email after successful registration when I use the "resend" function the email…
Markus
  • 1,909
  • 4
  • 26
  • 54
7
votes
3 answers

Change (e-mail) button colors in Laravel 5.7

What is the best way to change the success, error and primary colors in Laravel 5.7? I have the email.blade.php via php artisan vendor:publish --tag=laravel-notifications ... {{-- Action Button --}} @isset($actionText)
Arno van Oordt
  • 2,912
  • 5
  • 33
  • 63
6
votes
2 answers

Laravel: Copy models/rows from one connection to another

I want to copy an eloquent model from one connection to another. The way I have done this so far is as so: $users = User::on('connection1')->where('tenant', 'foo')->get(); User::on('connection2')->insert($users->toArray()); This works most of the…
Yahya Uddin
  • 26,997
  • 35
  • 140
  • 231
6
votes
2 answers

Laravel fails to find route except when the route is named

I'm trying to implement a basic authentication system using only the built-in Laravel features. The system works but only if I assign a name to the /admin/login route [i.e ...->name('admin.login)]. If I take it out, the exception I get is the…
uhexos
  • 383
  • 4
  • 19
6
votes
2 answers

Laravel Horizon throws error : Call to undefined function Laravel\Horizon\Console\pcntl_async_signals()

i have succesfully installed and setup laravel-horizon as per documentation when i running this command php artisan horizon it throws below error : Symfony\Component\Debug\Exception\FatalThrowableError : Call to undefined function…
Saurabh Mistry
  • 12,833
  • 5
  • 50
  • 71
6
votes
2 answers

Your requirements could not be resolved to an installable set of packages. - Laravel 5.7

I tried to install a package composer require vinkla/instagram php-http/message php-http/guzzle6-adapter I kept getting Do not run Composer as root/super user! See https://getcomposer.org/root for details Using version…
code-8
  • 54,650
  • 106
  • 352
  • 604
6
votes
9 answers

laravel api not showing message from request validation

im having problems with error handler in my backend laravel api, don't show error message from validation. routes/api 'api', ], function ($router) { Route::post('access/sign-up',…
Agustin
  • 215
  • 1
  • 2
  • 14
6
votes
3 answers

Getting 500 server error with Laravel 5.7 on Windows

I have cloned repo from git, and made composer install. Then I am starting a server, but every time I get 500 server error. Also, I tried to create a new project with composer create-project --prefer-dist laravel/laravel blog and this project…
domanskyi
  • 701
  • 1
  • 6
  • 19
6
votes
3 answers

Laravel validation required if field not equal to

I have custom validation rule in my controller: $this->validate($request, [ 'currency' => [ 'required', 'numeric', 'min:0', 'max:7' ], 'price' => [ 'nullable', "required_if:currency, !=,…
Andreas Hunter
  • 4,504
  • 11
  • 65
  • 125
6
votes
6 answers

Login a user only if his status is active in Laravel 5.7

I am new to Laravel and have been fairly successful in implementing user authentication. Now to move on to the next step I must allow only users whose status in active to login. For that I have added a status TINYINT column in my mysql users…
Debajeet Choudhury
  • 389
  • 2
  • 5
  • 9
1 2
3
92 93