Questions tagged as 'laravel'

1
answer

LARAVEL - Sharing images between projects

I have several Laravel projects on the same server. I often need to use employee photos and, as I have programmed it, I copy the photos from the public/assets/ images directory of an existing project into the same directory as the...
asked by 24.05.2017 / 15:13
1
answer

Check matching times within an array

I'm working with an array of undefined arrays, where each array (child) has another grouping of indefinite schedules (with start and end time) for the execution of a given task, in the example below there are only two groupings of schedules for...
asked by 05.03.2017 / 01:04
1
answer

Dynamic list in alphabetical order?

Inside this array of my dynamic list , its content is returning in a disordered way, how do I put it alphabetically? <div class="form-group"> <label for="nome">Categoria do Produto</label> <select i...
asked by 17.01.2017 / 00:48
1
answer

Difficulties in creating update with Laravel 5.1?

I'm trying to create a update with Laravel 5.1 but it's bringing the following error:    Type error: Argument 1 passed to Illuminate\Database\Eloquent\Builder::update() must be of the type array, object given Follow my Cont...
asked by 14.02.2017 / 13:58
1
answer

How to check if an array has an attribute?

I'm using Laravel 5.4 in an application, and a validator method gets an array . This array can have the attributes: [ 'nome' => $request->nome, 'ddd' => $request->ddd, 'fone' => $request->fone ] Or jus...
asked by 16.02.2017 / 16:08
1
answer

Middleware for post manipulation

I've created a middleware to check if the person who wants to manipulate a post owns it or is super admin . See: public function handle($request, Closure $next) { $user = \Auth::user(); $postId = $request->route('post'); $pos...
asked by 19.12.2016 / 15:19
1
answer

Target [Repository] is not instantiable while building [Controller, Service]

I am developing a system that when sending data by the form is returning me this error :    BindingResolutionException in Container.php line 763: Target   [Church \ Repositories \ MemberRepository] is not instantiable while   building [Churc...
asked by 13.12.2016 / 00:37
1
answer

How to run a crawler in Python with PHP

I made a crawler with Python and run it through the command line: python crawler.py As soon as I run this command it asks me for the keyword that will be searched for and start running. global keyword keyword = raw_input('Keyword: ') T...
asked by 27.01.2017 / 13:45
1
answer

Exception url in token Laravel?

In my project I need to release a url to a rest service that I'm implementing, but I'm not able to make the token exception for this route since I will not get it in the service. In the VerifyCsrfToken file, you already have th...
asked by 03.05.2017 / 22:16
1
answer

How to create an array dynamically in PHP?

I need to create an array in the format: //$arr = ['id' => 1, 'razao_social' => 'Teste'] // saida esperada // iteração foreach($prestadores as $prestador){ // logica separando apenas alguns prestadores if ($cont($outro_sql) >...
asked by 14.11.2016 / 22:40