Questions tagged as 'laravel'

1
answer

call method in laravel query

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...
asked by 29.12.2016 / 14:34
0
answers

Convert sql to eloquent

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...
asked by 04.08.2018 / 19:35
2
answers

Convert View with CSS, JS and PDF Images

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...
asked by 09.08.2016 / 19:37
0
answers

Problem with foreach, laravel is not recognizing the model Indexes [closed]

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...
asked by 20.11.2015 / 23:23
1
answer

How to redirect to auth / login in Laravel 5.1 if the visitor is not authenticated? [closed]

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...
asked by 17.09.2015 / 20:37
1
answer

How to create a project based on Laravel to be the basis of others?

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...
asked by 16.06.2016 / 14:31
3
answers

Error executing composer update when trying to install scafold package in Laravel 5.1

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...
asked by 30.06.2015 / 17:32
3
answers

How to make the relationship of an extra field (pivot) in belongsToMany

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...
asked by 15.07.2015 / 14:39
1
answer

Installing Laravel 4 on remote server [closed]

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.     
asked by 25.10.2014 / 05:55
2
answers

Error installing Laravel: Package not available in stable version [closed]

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...
asked by 31.03.2015 / 19:03