Posts by Cleber Martins • 91 points
8 posts
-
1
votes2
answers198
viewsA: Laravel Authorization for Multi Authentication
I found a solution during debug, editing the Authserviceprovider like this: public function boot() { $this->registerPolicies(); $permissions = Permission::with('roles')->select('id',…
-
0
votes2
answers198
viewsQ: Laravel Authorization for Multi Authentication
I have an ACL app for Laravel where I have two sessions(Guards), one for users and another to admins. The configuration of Guards auth.php file looks like this: 'guards' => [ 'web' => […
-
3
votes2
answers172
viewsQ: Is it worth 'shuffle' ID that will be passed via URL?
We were talking about database security. Came the question: worth encrypting Ids coming from the database to the frontend? E.g.: I click on a client from a list where the link goes…
-
1
votes1
answer137
viewsQ: Set associative array key
Consider this array: protected $filter = [ 'preco' => 'required;double(1,4)', 'email' => 'required;email' ]; Step by the foreach: protected function bootFilterPost() { foreach…
-
0
votes1
answer98
viewsQ: Strange values when generating array in a dynamic object in PHP
Follow this example code: class Object{ private $keys = []; private $values = []; public function criarArray(){ $obj=get_object_vars($this); foreach($obj as $key => $value): $this->keys[] =…
-
0
votes2
answers851
viewsA: PHP - Laravel - Send a data entered in the database to another view
You can redirect passing this ID as a variable through the with() method; Ex.: return redirect()->route('index')->with('variavel' => 'valor');
-
2
votes1
answer3314
viewsQ: List and display images in the Laravel 5.3 Storage
I develop an application with Laravel 5.3, where the _DocumentRoot_ stays in the folder public. Upload images are in storage/app/public, but I don’t know how to list these images in a view, I can…
-
1
votes1
answer418
viewsQ: Laravel Blade prints unknown values
I use Laravel 5.3. I have a variable that returns this value in a var_dump(): array(3) { [1]=> string(5) "10:00" [2]=> string(5) "10:20" [3]=> string(5) "11:40" } But if I give:…