I have the following scenario in a database:
Tables:
User
id,
name
email
Company
id
name
UserCompany
userid
business_id
start_date
data_termino
In this scenario, I need to bring the information...
Personal I have a folder inside the resources called js where it has several JS files and subfolders with other JSs. How do I set up Laravel Mix for it to compile all the contents of the JS folder including the subfolders into the public / js fo...
Good afternoon. I have the following code that perfectly saves.
public function store(Request $request)
{
$this->validate($request, [
'servidor' => 'required|unique:servidors|max:255',
// 'dtprotocolo' => 'date|date...
I'm using PostgreSQL "5.4. *"
Using MySQL, after php artisan migrate ok.
But now I need to use PostgreSQL in the project, but after changing the DB:
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=laravel-api
DB_USE...
I have two queries looking at the model. The first one is working normally:
$pedidos = Pedido::
orwhere(function($query){
$query->where('user_id', $_SESSION['idUsuario'])...
That old doubt with Excel cell formatting is causing me problems now.
I use laravel framework and to export the data I use Laravel Excel .
I am formatting the cell for text type and even then Excel continues rounding the values and changing...
I have linked tables and when I need to access the information I recuse the query :
DB::table('paciente AS pac')
->leftJoin('pessoa AS p', 'p.id', '=', 'pac.id_pessoa')
->select('p.nome, pac.ficha')
->where('pa...
The code below returns all the records of the database and also searches for the term typed in input of search with pagination.
The problem is that by clicking for example on page 2 it already refreshes the page returning all the recor...
I have a menu with 3 possibilities: pg1, pg2 or pg3. The page is generated in Blade using bootstrap.
<a href="#" class="active">pg1</a>
<a href="#">pg2</a>
<a href="#">pg3</a>
I would have to identify in...
I'm starting with SQL of Laravel I looked a lot more I did not get a response of how to AND after where , follow sample code to implement AND .
SQL:
UPDATE contas
SET valor_titulo = 0,
WHERE id_contrato = 2...