All Questions

2
votes
3answers
1317 views

Laravel 5.4 : Get logged in user id inside __construct()

I am trying to access Auth::user()->id; inside constructor but it always return the error Trying to get property of non-object. I study in the laravel documentation that Session is not accessible i...
18
votes
3answers
10717 views

PHPunit Uncaught Error: Call to undefined method PHPUnit_Util_Configuration::getTestdoxGroupConfiguration()

i don't know if it's related to Laravel 5.4. when i run phpunit command after installing laravel 5.4 without making any changes i get Uncaught Error: Call to undefined method PHPUnit_Util_Configuratio...
2
votes
3answers
15358 views

Laravel 5.4 TokenMismatchException in VerifyCsrfToken.php line 68

When I login for the first time it works perfectly but when I log out from my app and try to re-login I get this error. I've tried almost every available solutions but can't solve the issue. Any solu...
1
votes
1answers
151 views

Laravel connection MSSqL server works with cli, but not in browser

After installing the dll's to use with MSSqL server, the command php artisan migrate ran correctly and the tables were made in the db. So I thought the connection would work for this application. I t...
30
votes
1answers
30718 views

PHP7 : install ext-dom issue

I'm running laravel 5.4 on Ubuntu 16.04 server with PHP7. trying to install cviebrock/eloquent-sluggable package throw some error: pish@let:/home/sherk/ftp/www$ sudo composer require cviebrock/eloque...
10
votes
3answers
9323 views

How to validate array in Laravel?

I try to validate array POST in Laravel: $validator = Validator::make($request->all(), [ "name.*" => 'required|distinct|min:3', "amount.*" => 'required|integer|min:1'...
14
votes
8answers
8724 views

Laravel 5.4 Disable Register Route

I'm trying to disable the register route on my application which is running Laravel 5.4. In my routes file I only have the Auth::routes(); Is there a way to disable the register route?
2
votes
5answers
6978 views

Laravel 5.4 - How to customize notification email layout?

I am trying to customize the HTML email layout that is used when sending notifications via email. I have published both the mail and notification views. php artisan vendor:publish --tag=laravel-mail...
3
votes
1answers
697 views

Laravel 5.4 - How to set PDO Fetch Mode?

The ability to customize the fetch mode was removed from L5.4 and is defaulted to PDO::FETCH_OBJ. The upgrade guide states that you can override this by using an event listener: Event::listen(Statem...
2
votes
2answers
105 views

How to set where in relation Laravel?

I use the following construction for joining tables: with("attachments", "offers.publisher"). public function publisher() { return $this->belongsTo("App\User", "user_id", "id"); } ...

Previous Next