MaverickChan

Experience

67,150

27 Best Reply Awards

  • Member Since 2 Years Ago
  • 469 Lessons Completed
  • 0 Favorites

23rd July, 2018

MaverickChan left a reply on Js/app.js • 7 hours ago

it is a common trap you would fall when you were new to laravel . laravel use webpack to compile all css and js files to app.css and app.js , if you want to import a new asset , import through npm or yarn , then run npm run dev to compile them down.

for example , if you wanna use jquery in laravel project , first , npm install jquery.

then , in your resource/assets/js/app.js file , add a line : import $ from 'jquery', compile , then good to go.

note that , resource/assets/js/app.js is not the same as public/js/app.js.

18th July, 2018

MaverickChan left a reply on How To Pass An Array As A Prop? • 5 days ago

use double quote , and you dont really need json_encode at all

MaverickChan left a reply on How To Access Localhost Route On Vmware MacOS • 5 days ago

which one is serving?? macOs or your windows?

15th July, 2018

MaverickChan left a reply on Uninstall Vmware But Still Port 80 Blocked • 1 week ago

@mitismirza Oh , try something else : if you had installed vmware , the local network enviroement would change . so , check your network settings , the network adaptor .Or , if you are using a VPN service , that might cause this problem too . My advice , uninstall those things , start from scratch.

14th July, 2018

MaverickChan left a reply on Uninstall Vmware But Still Port 80 Blocked • 1 week ago

if you are using windows 10 , check your windows setup , disable the default IIS service . Some version of win10 would automatically run IIS , port 80 would be used .

13th July, 2018

MaverickChan left a reply on Image Upload On Button Click. • 1 week ago

in my opinion , always extract your method in a single component.

you can find a sample here : this lession.

11th July, 2018

MaverickChan left a reply on Server Responded With 0 Code Error - Files Bigger Than 2MB • 1 week ago

check your dropzone.js setup , it may also has a limit

9th July, 2018

MaverickChan left a reply on Trouble Installing On Windows 10 • 1 week ago

@vincej , because if you want to change some css or Vue.js component , you will need npm to compile them.

MaverickChan left a reply on Trouble Installing On Windows 10 • 1 week ago

@vincej , remember , laravel 5.6 requires php 7.2 , check your php -v.

and here are some hints of install wamp manually :

  1. choose x86 version of apache 2.4 2.choose x86 version of php 7.2 3.install composer 4.install node.js , you can choose LTS version of the newest one , i prefer LTS , it is stable 5.install cmder , it is a better command line tool , you can use some unix command 6.be sure to config apache and php right.
  2. php 7.2 has changed a lot from 7.1 , some of the extensions are removed , please read the change.log 8.it is always pain using windows as a dev machine , but win does not have permission troubles

8th July, 2018

MaverickChan left a reply on Trouble Installing On Windows 10 • 2 weeks ago

the better way is , install a ubuntu on your computer , that was much easier.....

for real , don't use xampp , install apache and php manually , there are tons of tutorials on the internet . and of course , composer has a internet connection problem depends on where your country is ....

and , what is your version of win10 , strongly recommend win 10 pro , not family or student version .

5th July, 2018

MaverickChan left a reply on Use For Loop Inside Vue.js Method • 2 weeks ago

i kind understand your question , you wish to get a array of all selected contracts' id , right?

if contracts is an object , you cannot use contract[i] .

3rd July, 2018

MaverickChan left a reply on How To Fix This Vuejs Warning • 2 weeks ago

the warning message has given the best solution.

2nd July, 2018

MaverickChan left a reply on Need To Print The Json Data Using Foreach Loop In My View Page • 3 weeks ago

@foreach($response as $value)

    {{ json_decode($value,true)->status }} and so on...

@endforeach 

25th May, 2018

MaverickChan left a reply on Do I Need Vue Router At All? • 1 month ago

no , not at all

15th April, 2018

MaverickChan left a reply on Display Pre Loader When Untill App Fully Initilize • 3 months ago

if (document.readyState == 'complete') {

                    this.showLoading = false;

                }

19th March, 2018

MaverickChan left a reply on Signout Route Won't Work • 4 months ago

signout should be a post request

12th March, 2018

MaverickChan left a reply on V-on:click="reverseMessage' Is Not Working • 4 months ago

data must be returned , or it won't refresh when you change them.

try :

data () {

    return {

        message : 'your word ',
    
    }

}

11th March, 2018

MaverickChan left a reply on I Get 405 (Method Not Allowed) Error On A DELETE Ajax Request • 4 months ago

in your form , html only accept get and post method , you need to pass a hidden input

<input type="hidden" value="delete" name="_method" />

10th March, 2018

MaverickChan left a reply on Issue With Npm Run Watch • 4 months ago

run npm install first

8th March, 2018

MaverickChan left a reply on Calling My API From My Web Site • 4 months ago

your api website should provide json format data , right?

then in your local controller , try

$data = file_get_contents('http://yourAPIwebsiteAddress');

use axios visit your local address.

because axios has laravel cross-site token protection , you cannot visit your api site directly , you have to remove the javascript csrf token , which is not safe for your local site.

7th March, 2018

MaverickChan left a reply on Getting Value From Vue Component Into HTML. • 4 months ago

don't really understand ...

maybe setup 2 component , the parent component is responsible for rendering , then the child component could fire an event to communicate with parent .

6th March, 2018

MaverickChan left a reply on Font Awesome In With Laravel Mix • 4 months ago

@mouhcinemahfoud

should be

@import "~font-awesome/scss/font-awesome.scss";

@ejdelmonico

you don't have to copy , laravel mix will do it for you

5th March, 2018

MaverickChan left a reply on Simple AJAX Call To Update A Table With The Content Coming From A MySQL Table • 4 months ago

contenteditable the table td , on focus update your input , on blur update to the database , done.

MaverickChan left a reply on How To Get All Data From Db? • 4 months ago

@alex_storm ok , i kind understand what you what now .

1st , get all rows names of your table

$columns = Schema::getColumnListing('table');

2nd , iterate the columns

foreach ($columns as $columns) {

'your connection and table '->select($columns)->get();

}

MaverickChan left a reply on How To Get All Data From Db? • 4 months ago

retrieve huge data could cause server problem.

if you insist , try

->get();

MaverickChan left a reply on Not Able To Edit .env File • 4 months ago

what is your dev environment ? Which editor are you using?

4th March, 2018

MaverickChan left a reply on How To Create An Editable Table With Vue.js • 4 months ago

it is really not that hard .

1 . make the td conetenteditable

2 . on td , add 2 event listener , @blur @focus

3 . when focus , read data and edit content , when blur , save back to database.

3rd March, 2018

MaverickChan left a reply on Display Image In Vue.js • 4 months ago

@afoysal

  1. store your image FILE at some path on your server.

2.store your image PATH into database.

MaverickChan left a reply on Display Image In Vue.js • 4 months ago

MaverickChan left a reply on Can Anyone Spot My Error (Where Clauses Not Firing) • 4 months ago

if i guess right

$query1->where([['run_id', $runid],['year_id',$yearid]]);

2nd March, 2018

MaverickChan left a reply on Updating Array Saves Back As Object • 4 months ago

add (object) before the variable

25th February, 2018

MaverickChan left a reply on After Adding Vuejs File Select2 Conflict • 4 months ago

before export default ,

do

var $ = require('jquery');

assuming you are using webpack and laravel , you can use npm to compile down all the js files

24th February, 2018

MaverickChan left a reply on How To Show Random Posts Using SortBy()? • 4 months ago

@Cronix No Offense Either , if you can retrieve all data , why not filter it first then use ->random() function ?

you can change ->get() to any of your method . That was just an example.

i am giving a useful way , and of course , a good way .

MaverickChan left a reply on How To Show Random Posts Using SortBy()? • 4 months ago

@larpajd12

Laravel has a helper function called random() , you can chain it after your collection.

$randomUser = DB::table('users')->get()->random();

also , you can get random multiple records.

$randomUser = DB::table('users')->get()->random(12); //this will get 12 random records

MaverickChan left a reply on Laravel Error During Migration • 4 months ago

maybe a simple miss-spell

could be : created_at , you write: creat ed_at

MaverickChan left a reply on Vue Model Does Not Working • 4 months ago

you are missing :

:name="{{ pick_name }}"

23rd February, 2018

MaverickChan left a reply on How Do I Upload Multiple Photos In Laravel. • 4 months ago

@andremac96 show some error message so we can help you

21st February, 2018

MaverickChan left a reply on JSON Response With Backslashes • 5 months ago

add another \ before a \

20th February, 2018

MaverickChan left a reply on How To Solve This Data Update Error In Laravel • 5 months ago

@kistlak your method should be patch or put , in route and in the form.

MaverickChan left a reply on How To Solve This Data Update Error In Laravel • 5 months ago

try

<td> <a href="{{  url('/edit/'. $value->id) }}"><input type="submit" name="update" value="Update" class="btn-primary"></a> </td>

and do

php artisan cache:clear

php artisan view:clear

16th February, 2018

MaverickChan left a reply on Works But Loads Of Errors • 5 months ago

first , you don't need to put this before axios.

2nd, you don't have to declare tag in your data. delete it then see if it is working

MaverickChan left a reply on How Can I Access A Parent Method From Child Component In Vue.js? • 5 months ago

@chrislentz


this.$parent.MethodName();

MaverickChan left a reply on Trying To Create A Modal Window • 5 months ago

@Tarasovych notice you are using bootsrapVue , but the default Vue.js is using none css template. Maybe there is some conflict css name causing this problem.

check and change.

14th February, 2018

MaverickChan left a reply on Trying To Create A Modal Window • 5 months ago

Try reading the doc of Vue.js , which is the most helpful doc of all. VUE Modal.

13th February, 2018

MaverickChan left a reply on Laravel 5.6, Bootstrap 4 + Template, JQuery And Vue • 5 months ago

have your install node.js and npm?

need to compile css and js before you go

MaverickChan left a reply on V-for - Issues • 5 months ago

show some of your controller

or if there is any error display in your console?

10th February, 2018

MaverickChan left a reply on HOw To Post Ajax To Controller • 5 months ago

@Cheers02 please show me your route file.

9th February, 2018

MaverickChan left a reply on HOw To Post Ajax To Controller • 5 months ago

your url in ajax is wrong.

should be


'/postId'

no . needed

28th January, 2018

MaverickChan left a reply on Laravel: Fetch Data Inside A Vue Component • 5 months ago

@wilk_randall that is what i am talking about : props data type is very important , should be very carefully when sending props to the component.

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.