Posts by Raylan Soares • 2,315 points
112 posts
-
2
votes2
answers436
viewsA: Problem with Laravel Routes 5
The route local that you accessed is not registered, try to do this and access localhost:8000/brands Route::group(['prefix' => 'marcas'], function () { Route::get('/',…
-
2
votes2
answers56
viewsQ: Field of type time or decimal, how to solve?
I have in the system that I am developing a field called flow, which can be filled either with a decimal value like 0.5 and 2.4 or with a value of time, like 15 min and 5 h. What is the best…
-
3
votes1
answer341
viewsA: Design versioning Standard 5.1
The archive .env is only on the machine we are working on, when we send the project to git that file is usually not sent. To configure your application in another workplace do the following: Clone…
-
2
votes2
answers7856
viewsA: How to get the GET value in Laravel, even when the request method is POST?
I guess you just take the variable you used to receive on the route, no? Like, if you sent only one parameter via url, in your route you must have a {parameter}, in your controller you get it with…
laravelanswered Raylan Soares 2,315 -
25
votes1
answer8303
viewsQ: How to sign a PDF digitally?
I am developing a PHP system with the Laravel 5.1 framework that will generate some technical reports, and the client wants these reports to be digitally signed, IE, que conste la no PDF generated…
-
0
votes1
answer112
viewsQ: How to Save Data to Generate a PDF?
There is a part of the system where the user will fill a lot of information just choosing between options selects, those selects are fed information I have registered in my database. When I am…
-
2
votes1
answer173
viewsQ: How to Sort Related Model Data?
I have the following relationship in my application: Model Client: class Cliente extends Model { protected $table = 'clientes'; public function Usuario(){ return…
-
1
votes2
answers94
viewsA: Save Related Models (One to One) - Laravel 5.1
I was able to resolve this issue as follows: $complemento = Complemento::firstOrNew(['id_info' => $id]); //requests... $complemento->save(); was even better since I had the need to also create…
-
1
votes1
answer657
viewsQ: Create Postgres "Numeric" Field in Laravel 5.1
I need to create a field like Numeric existing in postgres using migrations from the Laravel, can anyone tell me how I do? I tried that, but it didn’t roll: public function up() {…
-
0
votes2
answers94
viewsQ: Save Related Models (One to One) - Laravel 5.1
I have a Model Info and a Model Complement that are related one to one. The relationships are already working properly, I can pull the data and such, but I need to do an update and do not know how.…
-
1
votes1
answer1057
viewsQ: Delete Directory Image - Laravel 5.1
I have in my method the following code: try{ Tecnico::find($id_tecnico)->delete(); DB::commit(); return Redirect::back()->with('message', true); }catch (\Exception $e){ DB::rollback(); return…
-
1
votes2
answers1235
viewsQ: Anchor Link Edge or Positioning
I have an anchor link that takes a button at the top to a certain part of the page, but as my menu accompanies the page, it ends up being cut as in the image below: How would I give a space? Margin…
-
1
votes1
answer149
viewsA: How to save data from various Mysql queries?
Solved! Code: $itens = []; while($array = mysqli_fetch_array($result)){ $d1 = explode("-", $array['data']); $itens['cobre'][] = sprintf("{x: new Date(%s, %s, %s), y: %s}", $d1[0], $d1[1]-1, $d1[2],…
-
2
votes1
answer149
viewsQ: How to save data from various Mysql queries?
I have a table with data of various metals and I need to take this data to use on my page, but I’m not getting to pick all, only the first works. Code: $link = mysqli_connect("localhost", "root",…
-
0
votes1
answer53
viewsQ: Highlight "Blog" menu when accessing a category or post
I have a wordpress site and would like as it is selected the menu according to the page I am, also be selected the item "Blog" menu when I am on a category page or in a post. This is the menu code…
-
2
votes1
answer241
viewsQ: Display div elsewhere according to screen resolution
Could I give a different include for each resolution? Type... if the resolution(width) is greater than 768 I want to display 2 columns(grid_6 and grid_6), opening the text on the side, ok. but if it…
-
2
votes1
answer17754
viewsQ: How to position a div in front of another
I tried it this way, but it didn’t work... keep the bottom one on top of the top one, when it should be the other way around. What I’m doing wrong? .funil{ text-align:center; } .funil_1 {…
-
1
votes1
answer1826
viewsQ: Rectangle/cone with css only
Could it be like a rectangle/cone just using css? As in the image below: I need to use as background of a div or button, but it has to be in this format.…
cssasked Raylan Soares 2,315 -
0
votes0
answers683
viewsQ: How to record and display images using Postgresql and Laravel 5.1
I have the following code in my Controller to save the image in the database, not any error so I think it works right. $data = Input::file('assinatura'); $escaped = bin2hex($data);…
-
1
votes1
answer477
viewsQ: Count characters from an input ignoring the maskedinput
I have a script to advance the cursor to the next field of a form when the current field reaches its character limit(source). When I tried to put the maskedinput gave problem, because the mask…
-
0
votes2
answers1187
viewsA: How to configure crontab to run URL, Linux Ubuntu command
Victor, do with the following command: 0 * * * * /usr/bin/curl http://meusite/rota You said in your question that you used Curl, but I saw that you put only the command, so I think it would be the…
-
3
votes3
answers593
viewsQ: Move Cursor to Next Form Field
I have a form with various inputs, combos and etc. How can I make so that when the user selects an option in the combo the cursor already jumps to the next form field? Also make sure that when the…
-
1
votes1
answer1597
viewsQ: Activate Laravel Maintenance Mode 5.1 No Artisan
I know there’s a command php artisan down to activate the maintenance mode, but I have my application hosted and do not know how to give this command. Would you have any other way to do this?…
-
2
votes2
answers2555
viewsQ: How to Type in a Select?
How can I make a select work also as a search field? Type, the client type as if he were typing in a input text for example, and the options of select are being filtered according to what he typed.…
-
1
votes2
answers6064
viewsA: How to pass parameter on a route?
Mauro, I’m glad you were able to solve the problem with the help of @rray, but then I suggest naming your routes because it will be much better if you need to make some future changes, for example:…
-
1
votes1
answer211
viewsQ: Sorting the results of a query - Laravel 5.1
I currently have a code that receives data from registered companies and for each company it lists their reports as follows: @foreach($empresas as $empresa) // Recebe as empresas…
-
0
votes0
answers38
viewsQ: Commit only at the end of the registration stages
I want to register that will have several forms, for example: first I will register basic information, to advance register more advanced information according to what was passed in the 1st phase of…
-
2
votes3
answers2107
viewsA: Route access control - Laravel 5.1
Believe it or not, but after spending practically all day on it, I solved the problem by just switching "===" for "==" and "!==" for "!=". I don’t know what might have caused this malfunction in the…
-
3
votes3
answers2107
viewsQ: Route access control - Laravel 5.1
I have some views that only clients can access, and some that only administrators can access. What I defined in this case is id_client, which if it is "1" is administrator and if it is any other…
-
1
votes1
answer1739
viewsQ: How to use "Sync" from Laravel 5.1?
I recently discovered a feature of eloquent called sync, I saw that he kind of compares the data passed with the data that’s in the database and deletes or inserts what’s different. I wanted to…
-
4
votes1
answer260
viewsQ: Pagination hasMany Laravel 5.1
I have the following relationship in my Model Client: public function Usuario(){ return $this->hasMany('SIST\Models\Admin\Usuario', 'id_cliente'); } I pass the customer data through my…
-
3
votes1
answer698
viewsQ: Can too high an ID (auto-increment) be harmful?
I have a table that has a very high turnover of information, that is, many records enter and many leave as well. With this the ID (auto-increment) is much higher than the value of data in the table.…
-
0
votes1
answer366
viewsQ: Fill a Select Multiple and Update Table
I have a <select multiple> which is filled with information from a table exams, the user selects the exams he wants for a certain function and sends to register in the table exams, okay. My…
-
1
votes1
answer368
viewsQ: Fill textfield with the description corresponding to the value selected in a combobox
I have in my view a select that receives data from functions and lists. <select id="id_mfuncao" name="id_mfuncao" class="form-control"> <option value=""><< selecione…
-
2
votes1
answer1020
viewsQ: Show Middle Screen Upload Image
I have a form and when typing the ZIP code I show a gif of loading while I carry the street, the neighborhood and etc. The problem is that as the user descends the form, the gif of the load does not…
-
4
votes1
answer324
viewsQ: Initial Value Sequences Postgresql - Laravel 5.1
Good morning, I am running some tests on my application, but I have the following problem: After the migrate and the db:seed, whenever I will enter some record by applying a duplicated primary key…
-
2
votes1
answer904
viewsQ: Single record with 2 fields verification - Laravel 5.1
I have a table with columns id, nome, descricao and tipo. In my Request I have: 'nome' => 'required|unique:edificacoes' So far so good, I can not register anything with the same name, but as I…
-
2
votes1
answer254
viewsA: Model, View and Controller "Multipurpose" - Laravel 5.1
Well, I’m not sure if it’s the best solution, but it suits me very well... I just joined all the tables and added a "type" column. As the data volume of each one is quite low I think it will work…
-
2
votes1
answer254
viewsQ: Model, View and Controller "Multipurpose" - Laravel 5.1
Good morning, I have in my application 10 different tables, but it has the same structure... id | nome | descricao. For each table I have in the Model, the Controller and the Views registration,…
-
0
votes2
answers1377
viewsA: Watermark in images with PHP
If the file doesn’t have a name, it will generate a: if (!$filename) { return $this->getDestination() . '/' . md5(uniqid(time())) . '.' . $this->sourceImageExtension; } If it has a name, it…
phpanswered Raylan Soares 2,315 -
2
votes1
answer2455
viewsQ: Folder for Models Laravel 5.1
Good morning, different from Laravel 4, the version 5.1 creates the Models directly in the folder App, wanted to know if it will influence something if I create folders to better organize these…
-
4
votes1
answer688
viewsQ: Ambiguous column - Laravel 5.1
Good morning! Here’s the thing... I have these 2 tables in my postgresql database: tipos_risco --id --nome agentes_risco --id --nome --id_tipo_risco (foreign key) The problem is I’m not getting the…
-
1
votes2
answers209
viewsA: To highlight a line in the result of php+sql query
if($array->usuario == $usuario){ echo '<strong>'.$usuario.'</strong>'; }else echo $usuario; }
-
2
votes2
answers467
viewsQ: Back button - Level above or Previous page
Good morning, I know the question seems strange and kind of obvious, but I’ve been having this question for a while... Let’s say it has the following structure: Home Clientes ---Lista ------Editar…
htmlasked Raylan Soares 2,315 -
3
votes5
answers56754
viewsA: What is the difference between syntactic error and semantic error?
I found this image that I believe illustrates well. source:http://www.cin.ufpe.br/~rcmg/cefet-al/algo/aulas/algo_05_linguagem_algoritmica_2_6pp.pdf…
-
0
votes2
answers694
viewsQ: Sidebar via Controller - Laravel 5.1 + Adminlte 2
Good afternoon! I have the following problem here... In my view model app.blade.php have the line @include('partials.sidebar') which includes my sidebar, okay. The point is that I have 2 different…
-
0
votes1
answer123
viewsA: Ajax / Jquery - Select / mark an option disabled automatically
Hi, I’ve been through something similar, I think that might be it: Replace the disabled for readonly. I think it works =)
-
1
votes2
answers186
viewsA: Error when implementing sharing for facebook
At the time of sharing that always appears the same data right? If it is, it must be because in div the data is static, and not dynamic as in the tag meta. Is that not it? <div class="fb-like"…
-
1
votes2
answers555
viewsA: Controller pulling database data from wrong place
Check your default connection in the database.php file, and see if it’s named after the connection you posted here, in this case "mysql" 'default' => env('DB_CONNECTION', 'mysql') Change these…
-
1
votes1
answer99
viewsA: Directory / Alias with domain
See if that helps you... Step 1 - The panel. Go to the Wordpress panel in your account. Look for the menu on the left, where it says "Settings". Go to "Blog Address (URL)" where you can determine…