Anwar

Experience

3,920

1 Best Reply Awards

  • Member Since 1 Year Ago
  • 32 Lessons Completed
  • 0 Favorites

6th July, 2018

Anwar left a reply on “Parse Error: Syntax Error, Unexpected 'public' (T_PUBLIC)” • 2 months ago

Check your "store" function, at the end the last "else" statement misses an accolade ;).

PHP thinks the "store" end accolade belongs to the "else" statement, so as it throws an exception because public is not allowed in class property of method function, but PHP parser thinks you still are in a method at this moment...

24th July, 2017

Anwar left a reply on Packagist From Custom Newly Created Console Command • 1 year ago

Thank you @m7vm7v, in parallel I found a tutorial from Devdojo that explains the same but not in video (for those that prefer reading instead of watching), I drop it for you guys it helped me also : https://devdojo.com/blog/tutorials/how-to-create-a-laravel-package

23rd July, 2017

Anwar left a reply on Packagist From Custom Newly Created Console Command • 1 year ago

Got the solution by following this tutorial (hope it helps you folks) : https://devdojo.com/blog/tutorials/how-to-create-a-laravel-package. It is what the documentation say and this step-by-step tutorial came really useful.

22nd July, 2017

Anwar started a new conversation Packagist From Custom Newly Created Console Command • 1 year ago

Hi guys,

I ended up creating a console command which is currently located in my laravel projet in /app/Console/Commands/DatabaseModelizing.php. I find it uselful and I which I could use it across all of my laravel project.

How could I end up with a Packagist.org package that could let everyone (not only me) requiring my package and be ready to use : php artisan database:modelize ?

Alternatively, is there any way to say to Laravel "hey, here is another commands from a class located at /vendor/.../DatabaseModelizing.php. Could you please register it ?" ?

23rd February, 2017

Anwar started a new conversation Libsodium • 1 year ago

Guys, check out PHP 7.2 and new Libsodium integration on core developement of this last version. What about Laravel and his current cryptography system ?

17th January, 2017

Anwar started a new conversation Using Laravel Authentication System With Existing Tables • 1 year ago

Hi there,

I am brand new on this forum, but I am using Laravel since less than a year now (seeing the evolution since 5.0 and the amazing job done untill 5.3 !).

The reason of this topic is that I would like to use Laravel to build up an authentication system. I gave a shot to the existing Laravel Authentication system available for version 5.3 (https://laravel.com/docs/5.3/authentication).

First I am using database method and not model method, so the configuration of my /config/auth.php file looks like this :

'providers' => [ // 'users' => [ // 'driver' => 'eloquent', // 'model' => App\User::class, // ],

'users' => [ 'driver' => 'database', 'table' => 't_e_utilisateur_uti', ], ],

(.env is correctly set up to talk to my "localhost" database)

Then I liked the fact that we can customize the query to specify our own column name for the username, which in my case is not "email" but "uti_email". So I used the code below :

public function username() { return 'username'; }

And added it to the existing /app/Http/Auth/LoginController.php file.

All works like a charm, but now I am stuck to specify my password field, which is not by default "password", but "uti_password". Is there any function like username() but for password ?

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.