Questions tagged as 'laravel'

2
answers

Problem with Http post Angularjs2

I followed the forms tutorial in the Angularjs2 documentation, but I can not send it by the post method I created the class as in the example export class Hero { constructor( public id: number, public name: string, public...
asked by 19.03.2017 / 15:44
2
answers

Validate form field in request from laravel

How can I validate that a field of the form only allows text ?, that is, do not accept a number or other characters other than normal letters of the alphabet. I assumed that this would be enough "campo" => "required|string" but if I e...
asked by 16.03.2017 / 14:18
2
answers

Can I use the same driver to register two types of people?

Well I have a form in php I have a select in which I choose if the type of client to register is natural or legal, by selecting which of the two shows the corresponding form. The problem is that to register each client type I am using two contro...
asked by 08.12.2016 / 03:32
3
answers

As valid, with laravel, that a field is only numeric?

I have tried with what appears in the documentation of laravel, but it does not help me this is my code: 'cedula' => 'numeric|required|unique:personas|min:6|max:8', This way, if I put letters, it says: "cedula must be numeric."...
asked by 18.11.2016 / 01:41
2
answers

Problem when displaying modal data from BD in Laravel

I have a table that brings all the records of my complex table and a button that opens a modal, the problem is that when selecting a record of the table (In the view) it does not show me as it corresponds the information of the chosen registry...
asked by 14.12.2018 / 15:14
1
answer

Ask about bd with conditional?

The question I have come up with is simple; I make a query with \DB $data = \DB::table('users')->select($lo_que_sea) ->where(['vacations.aceptado' => $filtro]) ->get(); I want to make a condition on that where so th...
asked by 23.08.2018 / 11:13
4
answers

Can a query be made in larvael where the two conditions are met where to make the query?

I need to make a query where both where are fulfilled, in this case that as long as user X and the status is PUBLISHED or DRAFT shows it, I currently have: $properties = Accommodation::where("user_id", $id)...
asked by 22.12.2018 / 18:29
2
answers

Add data from an array obtained from a WhereIn laravel 5.6

Good morning friends, I have this question of how to add these elements taken from several queries The result that shows me is this: [{"s1":15},{"s2":12},{"s3":5},{"s4":7}] What I need is to add them and then pass them to a view. This is...
asked by 04.09.2018 / 01:46
2
answers

Show data related to a foreach in Laravel?

I have two tables one called " Events " and another one " Dependences ", a dependency can have several event , that's the relationship between they, what I try to do is show the data of a event , but also show the data of the dependence to w...
asked by 16.09.2018 / 05:21
1
answer

The server requested authentication method unknown to the client [caching_sha2_password]

I have installed MySQL 8 and Laravel 5.6.18; when I try to execute the migrations with: php artisan migrate An example of my migrations is: Schema::create('categories', function (Blueprint $table) { $table->increments(...
asked by 15.05.2018 / 16:06