in the most shared servers the default public folder is named public_html or www, whats may present a problem since the server document root and Laravel public folder are not the same.
Let's fix it following this 3 steps:
That´s it, just do it.
package main | |
/* | |
Uses the same gin router to mount embedded frontend. | |
Change the //go:embed .\frontend | |
Change the `root, _ := fs.Sub(embedFrontendFS, "frontend")` | |
*/ | |
import ( |
in the most shared servers the default public folder is named public_html or www, whats may present a problem since the server document root and Laravel public folder are not the same.
Let's fix it following this 3 steps:
That´s it, just do it.
With this command, when your .env
file is configured, you can create your project database with php artisan db:create
when is the first time you clone your project.
To create this command, execute: php artisan make:command dbcreate
, and then , a file named dbcreate.php
will be generated in ./app/Console/Commands/dbcreate.php
, then just copy and paste the code of dbcreate.php file.
Debes haber agregado un elemento "ADO.NET Entity Data Model" (Hay una opción para mapear una base de datos existente)
Yo estoy utilizando una base de datos MySQL (la integración con Visual Studio instala con "MySQL for visual studio"), pero es lo mismo para cualquier DBMS que hayas integrado con visual studio.
En este ejemplo los objetos del modelo que creó la plantilla están en "aguapotableEntities"
using(aguapotableEntities db = new aguapotableEntities() ) {
En ocaciones, si se tiene un MySQL Workbench en una versión superior a la base de datos, esto provocará errores al hacer respaldos, por lo que siempre es mejor hacerlo con el "mysqldump" que incluye el servidor, ya que este y la versión del servidor serán completamente compatibles.
Primero debes de tener la ruta a /bin de la instalación de MySQL en la variable de entorno PATH, y también el 7zip si se desea comprimir desde consola.
Usualmente están en la ruta "C:\Program Files\MySQL\MySQL Server 5.7\bin" y para 7zip en "C:\Program Files\7-Zip"
Ejemplo de respaldo de db_test:
<?php | |
/** | |
* Read character separated values file like CSV, TSV, etc., | |
* If $a_asocciative==true returns asocciative matrix using | |
* the first row as column names. | |
* | |
* Example: print_r(csv2matrix("ocr_result.tsv", "\t")); | |
* | |
* @author Arturo E. Rosas Gutiérrez <https://github.com/AEROGU> | |
* @license MIT |
using Dapper; | |
using MySql.Data.MySqlClient; | |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Data; | |
using System.Linq; | |
using System.Security.Permissions; | |
using System.Text; | |
using System.Threading.Tasks; |