I have this query here:
SELECT p.descr, p.dt_hr, f.id_friend
FROM users u
JOIN friends f ON u.id = f.id_user
JOIN posts p ON p.id_user = f.id_friend
WHERE u.id = 1
It returns me this:
I'mwantingtospinintheforeachandmountanarraysomething...
How can I convert this code sql into eloquent ?
SELECT
CONCAT(FLOOR(sum(diferenca)/60),'h',MOD(sum(diferenca),60),'m') as tempo
FROM
(SELECT
TIMESTAMPDIFF(MINUTE, m1.created_at, min(m2.created_at)) as diferenca
FROM
me...
I have a view in Laravel where I load various graphics. This view is made up of HTML, Images, CSS and JS.
I need to convert (export) this page to PDF via a JS or PHP function.
I can not find a library that faithfully "copies" the page an...
Index Controller:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use View;
use App\Indexes;
use Illuminate\Support\Facades\DB;
class IndexController extends...
I am using Laravel 5.1 native authentication but when accessing a protected route the system does not redirect me to the login screen, instead it shows me the message "You do not have permission to access this resource."
The routes then this...
My idea is to create a base administrative panel, where I can use the next sites, without having to copy and paste. In the base I have only the control of users and menus, the rest I am creating packages and require each new site only what is ne...
I'm trying to install the scafold package in Laravel 5.1 but when I run the composer update it shows me an error.
C: \ xampp \ htdocs \ sites \ inventory> composer update Loading composer
repositories with package information Updating de...
I currently have the following situation:
1 User can belong to multiple municipalities
Within this relationship - municipios_usuarios - I need to also save who made this relationship, ie usuario_id
public function municipi...
How do I install laravel 4 on a remote server via composer?
I searched intensely on the internet and found no convincing answer that was in line with good practices or the philosophy of the framework.
I am strictly following the indicated in the Laravel documentation to install it:
composer global require "laravel/installer=~1.1"
However, after a long delay comes the following return:
Changed current directory to (...)/AppData/Roamin...