Questions tagged as 'laravel'

1
answer

Use external variables to route from Laravel 5 to send to view

Hello, I'm working with Laravel , and in my Routes file, I'd like to leave a variable I want to use on all routes, like this: /routes/web.php $foo = "ola mundo"; Route::get('/', function () { return view('page1', ["title" =>...
asked by 03.10.2017 / 14:37
1
answer

Foreach with two bd lists. blade of Laravel

I have read some articles and seen this way, but it is not correct giving the following error:    (1/1) ErrorException Undefined offset: 1 @foreach($palpites, $confrontos) as ($p, $c)) <tr> <td> {{ $p->diadojogo}}...
asked by 28.09.2017 / 14:20
1
answer

How to hide the token generated in the url by laravel

I have the following form with the get method, but when sending the request it sends the token through the url. How can I hide ur token? URL: 127.0.0.1:8000/search?_token=bsL7AC1ymwC1UbtwWSRwz4d6YrirLsAP5Xbkfnqh&busca=or <form action...
asked by 20.09.2017 / 21:23
1
answer

Migrate: Is it possible to change a table to add a column and already pass some value to it (excluding the nullable () option)?

for example I have the student table (name, age); Then I create a migration to add the genre (M / F) Schema::table('estudantes', function (Blueprint $table) { $table->string('genero')->nullable(); }); But instead of us...
asked by 11.01.2018 / 19:27
1
answer

I can not find the model generated by the artisan

I used the command php artisan make:model Exemplo and could not find where it saved this generated model so I could change it. I looked at the app / html folder and found nothing. My db is ready, so I do not need to use migrate, but I...
asked by 13.10.2017 / 16:25
1
answer

TEF communication

I need to integrate the TEF into my system. Does anyone have any idea how I can start this? Is there any open source software to do this integration? I found some information on the internet that talked about PayGo , would this be a viable opti...
asked by 22.08.2017 / 02:44
2
answers

Access direct key

I would like to access the direct key of an array object without having to loop (foreach) Instead of being like this: $nome = ""; $codigo = 0; $objeto = DB::select( "SELECT NOME FROM TABELA WHERE CODIGO = ?", array( $codigo )...
asked by 26.10.2017 / 21:43
1
answer

Configure Template (ready) in Laravel 5.x

I'm relatively new to development with laravel. I bought a template (bootstrap) for my system but I do not know how to configure it to work on my application's frontend . I have already tried some tutorials that copy index to welcome and...
asked by 06.07.2017 / 19:28
2
answers

Convert and save time in bank with PHP

I have an input field in which the user types an hour (eg "08:00") to convert this string to strtotime () and convert it back to date () and saved in mysql in TIME format. So far so good, though I think you should have a better way to do it. The...
asked by 06.07.2017 / 19:43
1
answer

How to use the bcrypt function of laravel?

I have a .php file in the public folder of Laravel and for bigger reasons I can not create a controller of it. However I need to use the bcrypt function to generate the password an encrypted password, but I can not use this functio...
asked by 09.09.2017 / 03:00