Data dodania Pytanie
2017-10-11 12:10 Laravel count-function in Model, then sortBy count() »
I am trying to Order the Posts table by the number of votes a Post has got. The votes are stored in an other table (Votes: post_id, user_id, vote_ty...
(3) odpowiedzi
2017-10-11 10:10 Add row in bootstrap table bug »
I need some help with my table in a form. The code looks like this: <div class="col-md-6"> <table class="table"> <tbody id...
(1) odpowiedzi
2017-10-11 10:10 Laravel Query builder, how to have 1 leading where and the other orwhere? »
I'm having a problem with my query. I want to filter through all Orders where user_id is the authenticated user. And run the searchquery on field num...
(1) odpowiedzi
2017-10-11 02:10 Laravel 5 crawler not loggin in to openweathermap.org »
I'm using https://github.com/dweidner/laravel-goutte crawler and trying to login to https://home.openweathermap.org/users/sign_in but response I'm get...
(0) odpowiedzi
2017-10-11 00:10 PHP: Undefined offset: 0, but not with dd() »
I am getting an Undefined offset: 0 error with laravel. The strange thing is that when I dd() it, it shows up. $ports = $container->getPorts();...
(0) odpowiedzi
2017-10-10 21:10 Laravel Query behave differently on IPv4 Vs. IPv6 Environment »
I have a weird situation here that I never seen before while using Laravel. I have the same code base on different set up, 1 in IPv4 VM, 1 in IPv6 VM...
(1) odpowiedzi
2017-10-10 17:10 Laravel command - Only optional argument »
I have a command with this signature order:check {--order} And execute this: php artisan order:check --order 7 For some reason that results in t...
(1) odpowiedzi
2017-10-10 17:10 Laravel vuejs routes »
What am trying to do is to build a laravel axios routes which have query parameters that is a sample request looks like axios.get("/user-management...
(2) odpowiedzi
2017-10-10 13:10 laravel groupby with array »
i have post with category $response=Post::groupBy('post_category','id')->get(); The above query will return all posts with category in the orde...
(2) odpowiedzi
2017-10-10 04:10 Laravel 5.4 update all records in table without using where clause »
I am trying to update all records from table withing single eloquent query in Laravel 5.4 Currency::update(['default'=>0]); I am expecting that ...
(1) odpowiedzi
2017-10-09 22:10 Minimize factories in test? »
Currently I am using many factories factory() in Test class, is there a way to reduce to 1 so I can only use factory(Something::class) in a test metho...
(1) odpowiedzi
2017-10-09 18:10 Laravel 5.5 FormRequest custom error messages validation not working »
I'm using the following standard code to validate a form which makes use of various arrays. The rules are correctly implemented, but when using the st...
(1) odpowiedzi
2017-10-09 13:10 Group by and nested array with php/eloquent/mysql »
Say that I have a time based dataset, which contains an array of data like this: { "group": "a", "date": "2017/01/01", value: 0.01 }, { "group"...
(1) odpowiedzi
2017-10-09 09:10 How to get price and sum the price as a total price according to date? »
THIS IS MY CODE $filter = DB::table('detail_clothes') ->get(['id', 'clothes_detail_date', 'clothes_price']) ->gro...
(1) odpowiedzi
2017-10-08 19:10 Why Job class is randomly cached? »
When the Job Class is dispatched via Laravel, it is randomly using old code of Job Class that is no longer exist. Everytime I dispatch it is random be...
(0) odpowiedzi
2017-10-08 16:10 How to add a random string column to laravel migration »
I have a table called 'threads' in my laravel app, to which i want to add a new column named key with random strings of length 5. I ran the php artisa...
(3) odpowiedzi
2017-10-08 16:10 Laravel Blade custom directive? looped includes »
Let's say I have the following code in my templates @foreach($page->getBannersForPosition('bottom') as $banner) @include('partials.'.$banner-&...
(1) odpowiedzi
2017-10-08 09:10 Laravel check csrf manually in controller »
I'm using Laravel 5.5. When I send POST request from laravel blade. Then everything is ok: $.post({ url: 'http://localhost/check', data: { ...
(0) odpowiedzi
2017-10-07 19:10 Artisan Call in Loop »
I have a custom console command that needs to loop through some companies and make a database for each. The command works now, but only once. It does ...
(2) odpowiedzi
2017-10-07 10:10 How can I get the lang inside my controller in laravel »
I am sending a post request to a controller with axios. The languge is set to fr and all blade texts are also changed to fr but if I send a post reque...
(1) odpowiedzi
2017-10-07 08:10 Laravel Eloquent Runs two queries on update? »
I was curious to know, if laravel eloquent runs only one query on updating a row. So I tried the following Route::get('/cli', function(){ DB::enab...
(1) odpowiedzi
2017-10-07 00:10 Laravel relationsip with one to one »
I have the following table structure users id email .... status //foreign key from tbl_status Now in my tbl_status id name descript...
(2) odpowiedzi
2017-10-06 20:10 How to use postgres jsonb operator '?' in laravel 5 »
I'm trying to run a query with jsonb ? operator https://www.postgresql.org/docs/9.6/static/functions-json.html. In database console its ok, but i can...
(0) odpowiedzi
2017-10-06 18:10 Does Laravel Auth::user()->name and Auth::user()->email do two querys »
I have a blade view for logged in users To display my users name and email I do this <p>{{ Auth::user()->name }}</p><br> <...
(2) odpowiedzi
2017-10-06 17:10 Predicting future IDs used before saving to the DB »
I am saving a complex dataset in Laravel 4.2 and I am looking for ways to improve this. $bits has several $bobs. A single $bob can be one of several ...
(1) odpowiedzi
2017-10-06 16:10 Laravel sort by descending or ascending with pagination »
I would like to perform a sort by ascending or descending together with pagination return \App\User:: paginate($request->per_page); how do i a...
(2) odpowiedzi
2017-10-06 13:10 How does Laravel scheduler handles daylight saving time? »
Currently I'm scheduling jobs to be executed at 2AM ->dailyAt('02:00');. I'm wondering what will happen if: DST ends: will the jobs execute twic...
(2) odpowiedzi
2017-10-06 13:10 laravel socialite other accounts information »
Hi I am using sociliate for social login of facebook and other social accounts. Its properly login in and all the permissions but i was just wondering...
(0) odpowiedzi
2017-10-06 12:10 Laravel 5.5 Unit testing controller method »
I am trying to setup a simple unit test for one my controller method. The goals is to test if the a view has an expected value. /** * Does the home...
(1) odpowiedzi
2017-10-05 15:10 Laravel get orders assigned to my user (with assignments history) »
I have 3 tables/models User (id) Order (id) Assignments (order_id, user_id, created_at) Admin can assign order to some user, then reassign it and ...
(2) odpowiedzi
2017-10-05 14:10 Registration redirct on condition based in laravel »
How can I redirect to specific path after registration in Laravel?. I want to redirect page on id after registration. please help me. Thank You, in a...
(2) odpowiedzi
2017-10-05 10:10 Fetch users who have posted the last comment 3 days before eloquent »
Actually, I need to send the reminder emails to all my users in a time interval. So basically if a user has not posted any comment in last 3 days I ne...
(2) odpowiedzi
2017-10-04 22:10 Laravel or PHP unique with multiple conditions »
I'm trying to get the unique rows from a MySQL DB from PHP and Laravel. In my DB I have: Email Errors Status a@a.a error1 pending a@a.a ...
(1) odpowiedzi
2017-10-04 16:10 Csrf token issue with scaling »
I have scaled my application to 3 different servers that use common mysql and redis service. Than I have set session and cache driver to my redis (the...
(1) odpowiedzi
2017-10-04 16:10 Laravel 5.5 Conditionally adding validation rule »
I have data coming in through an AJAX post like this: data: 0: {type: 'percent', amount: 10,…} 1: {type: 'percent', amount: 200,…} As...
(1) odpowiedzi