there is laravel mix in laravel which is wrapper at webpack. So from webpack.config.js you can reach to js file where you can find vue. Vue is probably at boostrap.js file
2nd April, 2018
Shirshak left a reply on Select 2 Not Working After Adding Vue. • 3 weeks ago
there is laravel mix in laravel which is wrapper at webpack. So from webpack.config.js you can reach to js file where you can find vue. Vue is probably at boostrap.js file
Shirshak left a reply on Select 2 Not Working After Adding Vue. • 3 weeks ago
check in assets/javascript there are plenty of vue files etc.. Its best if you can refer to webpack.config.js in root folder?
17th March, 2018
Shirshak left a reply on Same Type Of Route Skip If No Model Found? • 1 month ago
@maslauskast i agree but its not flexible.
Shirshak left a reply on Same Type Of Route Skip If No Model Found? • 1 month ago
@Sanctuary Yes but even though it is hacky the only problem i find is Route cannot be cached as you used clousure. I guess i need to make separate controller for such task only right? I guess framework don't have ability to skip routes on conditions
Shirshak started a new conversation Same Type Of Route Skip If No Model Found? • 1 month ago
Suppose my route looks like this
Route::get('/{page_slug}','[email protected]');
// and in controller there is implicit route binding
Route::get('/{username}','[email protected]');
// in controller there is implicity route binding
The problem is if pages don't exist it will immediately show 404 pages . Is there any simple way if there is no pages with page slug move to username and even if username is not found then skip to another.
Thanks
24th January, 2018
Shirshak left a reply on Anyway To Run Sudo Command And Getting Output? • 3 months ago
@burlresearch i just want those text to be in some file and updated regularly like 10 second so i can show live updates in website.
Shirshak left a reply on Anyway To Run Sudo Command And Getting Output? • 3 months ago
@burlresearch I guess you want to say run cron job on ubuntu right or there are other way?
Shirshak started a new conversation Anyway To Run Sudo Command And Getting Output? • 3 months ago
In ubuntu I can get the networking traffic details via
$ sudo iftop -t -s 1 -L 10
which gives result like this
interface: eth0
IP address is: 192.168.150.2
MAC address is: c0:3f:d5:f6:cb:d3
Listening on eth0
# Host name (port/service if enabled) last 2s last 10s last 40s cumulative
--------------------------------------------------------------------------------------------
1 192.168.203.115 => 128Kb 128Kb 128Kb 31.9KB
13.107.4.50 <= 10.0Mb 10.0Mb 10.0Mb 2.50MB
2 192.168.205.7 => 163Kb 163Kb 163Kb 40.9KB
202.166.193.140 <= 8.08Mb 8.08Mb 8.08Mb 2.02MB
3 192.168.204.103 => 342Kb 342Kb 342Kb 85.5KB
64.15.121.18 <= 6.38Mb 6.38Mb 6.38Mb 1.60MB
4 192.168.204.17 => 81.0Kb 81.0Kb 81.0Kb 20.2KB
13.107.4.50 <= 5.07Mb 5.07Mb 5.07Mb 1.27MB
5 192.168.205.86 => 78.7Kb 78.7Kb 78.7Kb 19.7KB
13.107.4.50 <= 5.06Mb 5.06Mb 5.06Mb 1.26MB
6 192.168.203.83 => 55.2Kb 55.2Kb 55.2Kb 13.8KB
64.71.142.229 <= 3.36Mb 3.36Mb 3.36Mb 859KB
7 192.168.205.23 => 52.5Kb 52.5Kb 52.5Kb 13.1KB
139.5.69.13 <= 3.05Mb 3.05Mb 3.05Mb 781KB
8 192.168.203.87 => 58.0Kb 58.0Kb 58.0Kb 14.5KB
139.5.70.14 <= 2.62Mb 2.62Mb 2.62Mb 671KB
9 192.168.204.224 => 74.1Kb 74.1Kb 74.1Kb 18.5KB
202.166.193.145 <= 2.23Mb 2.23Mb 2.23Mb 571KB
10 192.168.204.16 => 47.5Kb 47.5Kb 47.5Kb 11.9KB
139.5.70.13 <= 1.90Mb 1.90Mb 1.90Mb 487KB
--------------------------------------------------------------------------------------------
Total send rate: 3.01Mb 3.01Mb 3.01Mb
Total receive rate: 67.7Mb 67.7Mb 67.7Mb
Total send and receive rate: 70.7Mb 70.7Mb 70.7Mb
--------------------------------------------------------------------------------------------
Peak rate (sent/received/total): 3.01Mb 67.7Mb 70.7Mb
Cumulative (sent/received/total): 771KB 16.9MB 17.7MB
============================================================================================
But we know we used sudo there. I am working for page in university where i can show this result interactivly probably on charts. But I cannot get the output as it need sudo command .
I made command like this
$ php artisan university:internet
Which in turn calls that sudo command
I know it will give permissions error? Any way or hack to make it possible?
Thanks
14th January, 2018
Shirshak left a reply on Select 2 Not Working After Adding Vue. • 3 months ago
thanks for info :) Both correct so cannot decide :)
Shirshak left a reply on Select 2 Not Working After Adding Vue. • 3 months ago
Both answers are correct . Thanks for info.
Just knew vue js was not giving any changes to jQuery.
13th January, 2018
Shirshak started a new conversation Select 2 Not Working After Adding Vue. • 3 months ago
I have a form and in javascript i enable select 2 like this:
jQuery('.categories').select2()
And it works fine. But when i add vue like this just after above code like this
el: '#premium_book_form_body',
data: {
copy_type: 'hard_copy'
}
});
select 2 from another field stop working. I haven't done anything to those element. Is there something i am missing?
Shirshak left a reply on Laravel Valet Not Working On Public Folder Symlink • 3 months ago
@bobbybouwmann Yes you were indeed correct . Never expected storage facade would use APP_URL env variable. I thought only dusk uses it :D
Shirshak left a reply on Laravel Valet Not Working On Public Folder Symlink • 3 months ago
actually it was due to use of Storage::disk('public') facade. And it uses APP_URL from .env file pointing to localhost. So change APP_URL from .env file fixed it. Thanks everybody :)
12th January, 2018
Shirshak left a reply on Any Laravel 5.5 PDF? • 3 months ago
@Dunsti it is updated but not daily :)
Shirshak started a new conversation Laravel Valet Not Working On Public Folder Symlink • 3 months ago
I have already run php artisan storage:link
And i event went to public/storage/image/hello.jpg but when i go via url like this
xyz.test/storage/image/hello.jpg laravel valet shows 404.
What am i doing wrong here? Any Ideas
Thanks
8th January, 2018
Shirshak left a reply on Data Doesn't Updated In User Table • 3 months ago
try dd($request->all)etc . It may be due to mass assignment etc.
Shirshak left a reply on Laravel Doesn't Pass Request Object • 3 months ago
have you used namespaces properly. Like you can write use statement at top or use backslash \ for root otherwise it will be relative.
Shirshak started a new conversation Any Laravel 5.5 PDF? • 3 months ago
I found only laravel 5.2 pdf but we know laravel docs has been changed too much . So are there any laravel 5.2 pdf available.
I think we can make script for that which can fetch latest .md files from laravel/docs github repository if it is not available.
Thanks.
18th July, 2017
Shirshak left a reply on Is There Anyway To Know Which Which Query Runned While Inserting Through Eloquent? • 9 months ago
Shirshak started a new conversation Is There Anyway To Know Which Which Query Runned While Inserting Through Eloquent? • 9 months ago
I want to analyse which queried did run after inserting into database . It would be better if it list all those queries. Is there any tools and technique.
I know about events but they works only for select * isn't it?
Shirshak left a reply on Laravel Multi Insertion And Its Relationship • 9 months ago
@JeffreyWay Is there any clean laravel like solution such problems ? I digged into framework i think there is support for such task isn't it?
Shirshak left a reply on Laravel Multi Insertion And Its Relationship • 9 months ago
No bro It clearly means n+1 query so i didn't use it .
I just can directly insert like this
Question::insert($question)
as $question is array of array of required data in question table
Shirshak left a reply on Laravel Multi Insertion And Its Relationship • 9 months ago
@zLegend How would you get $question at first loop?
Shirshak started a new conversation Laravel Multi Insertion And Its Relationship • 9 months ago
We know about Model::insert()
But how about its associated relationship?
We know we can have 100 question after form submit but corresponding question have around 4 answer (For multiple choice questions)
Our question data look like this
$question = [
'1' =>[
'name'='Who is first president of America'?
...
]
...
'100' =>
'name' = 'When did Christopher Colombus discovered America'
....
...
]
$answers = [
'1'=>
[
'1' => 'Wilston Churcil',
'2' => 'George Washinton'
....
]
...
...
]
$correct_answer = [
'1'=>['2']
...
]
Relationship
We are trying to upload many questions at once
We can clearly see if we don't go for laravel create otherwise we will run n+1 problems and for 100 question we may probably need 100 + 400 + 100
queries which is extremely inefficient?
If Question::insert() has returned id of inserted question then it would be easy but it just return Boolean ..
Is there anyway to solve such issue without using n+1 problem.
I tried using n+1 and background job but it is really extremely slow :(
Any solution and hacks would be ok :(
6th June, 2017
Shirshak left a reply on Laracasts Premium Registration Not Workin? • 10 months ago
yea it seems buggy tried 4-5 times and it is working don't know what is happening :(
Shirshak left a reply on Broken Link • 10 months ago
@JeffreyWay There is no even a one tab which should be there
Shirshak left a reply on Broken Link • 10 months ago
@Jeffrey Way Yes this is bug in site. I tried to open that link in computer all link points to google.
What is happening without beautiful laracasts ?
Shirshak started a new conversation Laracasts Premium Registration Not Workin? • 10 months ago
I have exactly 9$ and i deposited it today. But it says um no you don't have insufficeint balance??
Do you need to pay for taxes like that also? confused :(
19th September, 2016
Shirshak left a reply on Why Laravel Not Returning Eloquent Model Data As Integer But Returns String? • 1 year ago
@Thijmen Yes it works. And i have encountered several problem with other field like category id etc.. should i use $casts variable on all of them?
Shirshak left a reply on Why Laravel Not Returning Eloquent Model Data As Integer But Returns String? • 1 year ago
@Thijmen Is it only in laravel 5.3 ? I think this used to work in laravel 5.2?
Shirshak started a new conversation Why Laravel Not Returning Eloquent Model Data As Integer But Returns String? • 1 year ago
I am new to laravel. And i have database migration User which looks like this:
$table->increments('id');
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->integer('is_admin')->unsigned()->default(0);
I created a admin middleware with the help of is_admin (above)
inside admin midleware it looks like this
if (Auth::user()->is_admin !== 1) { return redirect('home'); }
As it was always returning false I used dd() function
When I used dd() functionI was surprised :( dd(Auth::user()->id) returns 1 which is integer dd(Auth::user()->is_admin) returns "1 " which is string
So my if condition is failing .
I wonder why it is returning string when my database schema have already specified is_admin is integer?
27th March, 2016
Shirshak left a reply on Anyway Of Generating Bulk Controller In L5.2? • 2 years ago
@mehany Thanks :) I think this should be integrated inside box at least :)
Shirshak started a new conversation Anyway Of Generating Bulk Controller In L5.2? • 2 years ago
I have around 30 routes in laravel ? But you know to create controller from 30 routes is very difficult at least for me?
Is there no way to generate controller by just giving routes so that i should not manually type php artisan make:controller ArticleController
etc??
Thanks
Want to change your profile photo? We pull from gravatar.com.