spyworld

spyworld

Member Since 4 Years Ago

Experience Points 12,770
Experience Level 3

2,230 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 116
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • start-engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-session Created with Sketch.

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • subscriber-token Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • lara-evanghelist Created with Sketch.

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • chatty-cathy Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

16 Nov
8 months ago

spyworld left a reply on Npm Rebuild Node-sass Fails

Delete the node_modules folder and npm install again. Everything you upgrade the nodejs version, you require to reinstall node sass again.

If fails to rebuild again, you must choose the right nodejs version. I recommended to use version 8

15 Nov
8 months ago

spyworld left a reply on Laravel Scout Pre-filtering Results. Built In Where() Is Not Advanced Enough

You may create a scope or attribute in your model to get the filter the null

 public function scopeIsOpen($query)
    {
        return $query->whereNotNull('completed_at');
    }

To search null value is database, you can't use

where completed_at = null

you must use

where completed_at is null

spyworld left a reply on OOP BOOTCAMP ERROR (VIDEO 10)

Usually is related to plugins not installed. Check your vendor file. You can try alias the Class.

spyworld left a reply on Pass CSRF Token With Fileinput Plugin On Delete Url

unknown status usually is no response. Javascript is non-blocking I/O.

Try to create log to debug your CSRFToken filtering.

spyworld left a reply on BelongsToMany Where Like "%$var%" Search Not Working

Please share your code example.

26 Jun
1 year ago

spyworld left a reply on Select Menu From A NestedSet Table

This is depend on your structure. You can try Nestedset package. https://github.com/lazychaser/laravel-nestedset

spyworld left a reply on Laravel 5.5 - SQL Table Data Won't Insert But Can Edit,delete And Show

Change the config url address.

In your browser inspector, did you see any message like

XMLHttpRequest cannot load http://site123.local. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://site.local' is therefore not allowed access. The response had HTTP status code 500.

spyworld left a reply on Class Not Found

Did you declare a namespace in your Bank class? Try change to \Auth::user()->bank

25 Dec
3 years ago

spyworld left a reply on 5.1.11 Authorization/Gate Middleware

@sheepy85 Yeah, you should use belongsToManyThrough. In UserRepository, you can load/with roles and permission.

21 Dec
3 years ago

spyworld left a reply on Alternating SQLSTATE[HY000] Access Denied Errors

This is not port issues.

PDOException in Connector.php ...:
SQLSTATE[HY000] [2002] Connection refused

This error message from MySQL. Mean, you port is working well. You have to enable remote access in MySQL configuration. You also have to modify MySQL administrator account "All Host Access" known as "Grant Permission".

http://www.rackspace.com/knowledge_center/article/mysql-connect-to-your-database-remotely

spyworld left a reply on Best Composer Packages For Laravel

"laravelcollective/annotations" "laravelcollective/remote" "laravelcollective/html" "laravel/cashier" "league/flysystem-aws-s3-v3" "league/flysystem-rackspace" "predis/predis" "guzzlehttp/guzzle" "aws/aws-sdk-php" "pda/pheanstalk" "iron-io/iron_mq" "laravel/envoy" "gloudemans/shoppingcart" "barryvdh/laravel-ide-helper" "barryvdh/laravel-debugbar" "greggilbert/recaptcha" "intervention/image" "baum/baum" "vinelab/cdn" "pusher/pusher-php-server"

spyworld left a reply on [PDOException] SQLSTATE[HY000][2002] No Such File Or Directory

"laravelcollective/annotations" "laravelcollective/remote" "laravelcollective/html" "laravel/cashier" "league/flysystem-aws-s3-v3" "league/flysystem-rackspace" "predis/predis" "guzzlehttp/guzzle" "aws/aws-sdk-php" "pda/pheanstalk" "iron-io/iron_mq" "laravel/envoy" "gloudemans/shoppingcart" "barryvdh/laravel-ide-helper" "barryvdh/laravel-debugbar" "greggilbert/recaptcha" "intervention/image" "baum/baum" "vinelab/cdn" "pusher/pusher-php-server"

spyworld left a reply on RuntimeException: A Facade Root Has Not Been Set.

Check your phpunit test scripts. "tests/ExampleTest.php"

06 Dec
3 years ago

spyworld left a reply on Test

php closing tag is not recommend.

20 Nov
3 years ago

spyworld left a reply on Save Draft And Publish Button

@LostKobrakai is right. Without value, the result is false.

spyworld left a reply on Get Previous URL Including Hash Tags

Only javascript can recognize hash tag.

spyworld left a reply on HTML Content Through Mail

I can't direct use embed your image. If you want to show the picture in the content, you have to use img element with full url.

spyworld left a reply on Class 'Imagick' Not Found

@stillpoint What is your error message? We can see you're trying to save all the data.

spyworld left a reply on Class 'Imagick' Not Found

Imagick is a PHP extension. If you receive error message "Class not found", you have to install Imagick extension.

PHP Documentation: http://php.net/manual/en/class.imagick.php

Install Imagick extension: http://php.net/manual/en/imagick.setup.php

spyworld left a reply on Save Draft And Publish Button

<select name="publish">
<option value="0">Save as Draft</option>
<option value="1">Publish Offer</option>
</select>
$draft = 0;

if($request->has('publish')){
    $draft = 1;
}

$offer->update([
    'draft' => $draft
]);

spyworld left a reply on How To Get Input Old For Select Box Here Is My Code

Another problem is

@foreach($pantype as $pantype)

spyworld left a reply on How To Get Input Old For Select Box Here Is My Code

<select name="pan_type_id" class="pipip-select" id="insert_pan_type">

    <option value="0"> Please Select PanType</option>

    @foreach($pantype as $pantype)
        @if( old('pan_type_id') == $pantype->pan_type_id )
            <option value="{!! $pantype->pan_type_id !!}" selected>{!! $pantype->pan_type !!}</option>
        @else
            <option value="{!! $pantype->pan_type_id !!}">{!! $pantype->pan_type !!}</option>
        @endif
    @endforeach

</select>

For Laravel Collective:

{{ Form::select('location', $location_options , Input::old('location')) }}

spyworld left a reply on How Do You Handle Media?

You can create ImageManager model and integrated with cloud solution. ImageManager can manage all your photo.

spyworld left a reply on HTML Content Through Mail

Email always block image content. User have to manually "allow to load the images". Email provider try to prevent from malware.

spyworld left a reply on Laravel 5.1 Route Not Working On Amazon Server

My laravel application is not working on Apache2 + PHP5.6. I receive a lot of error. I try to check the error log. Can't fix the problem. The best solution is Nginx + HHVM.

spyworld left a reply on HTML Content Through Mail

You have to assign $im variable in view class.

return \View::make('home')->with('im',$im);
// or
return \View::make('home')->with(compact(im));

In blade file:

 <img src="{!! asset($im) !!}"/>

spyworld left a reply on Save Draft And Publish Button

You should reverse. "save as draft" is 0 and "publish offer" is 1. You can use jQuery for auto save.

$(#textrea).change(function(){
//ajax function
});

You don't need to separate into 2 button. Use HTML 5 select list.

spyworld left a reply on Cannot Add Foreign Key Constraint

Too many foreign key.

19 Nov
3 years ago

spyworld left a reply on How Do I Update Records From A Collection?

Can show your AJAX script here? So, we can help you to fix it.

spyworld left a reply on Calculating Total Hours From Times Laravel Sql

RAW Query is not recommended. It's not safe at all. @dilfdo You can found the answer in Carbon documentation. https://github.com/briannesbitt/Carbon#difference

spyworld left a reply on How Do I Update Records From A Collection?

POST method require token input. You have to remove CSRF. http://laravel.com/docs/master/routing#csrf-excluding-uris

Ajax POST with ID in URI. Example: /player/53/something

Does this work?

spyworld left a reply on Calculating Total Hours From Times Laravel Sql

Use Carbon

$time = new Carbon($shift_start_time);
$shift_end_time =new Carbon($shift_end_time);
$time->diffForHumans($shift_end_time);

spyworld left a reply on Custom Domain For Same Routes

You're right. Just duplicate controller between mylaravelapp.com and custom domain. If you separate between main domain and custom_domain in route, you can write a better script.

18 Nov
3 years ago

spyworld left a reply on Custom Domain For Same Routes

Try to not making yourself confuse. You can rewrite route into better format.

Route::bind('custom_domain', function($domain)
{
    return $page = $this->page->findByDomain($domain)->firstOrFail();
});

Route::group(['domain' => 'mylaravelapp.com'], function() {
    Route::get('/{slug}', ['uses' => 'HomeController@index', 'as' => 'page']);
});

Route::group(['domain' => '{custom_domain}'], function($domain) {
    Route::get('/', ['uses' => 'MyController@show', 'as' => 'page.customdomain']);
    Route::get('/page', ['uses' => 'MyController@page']);
    Route::get('/another/{custom_slug}', ['uses' => 'MyController@another']);
});

spyworld left a reply on Session()->flash() Disappears After Redirect()

redirect()->back()->with('status','My Status');

You can include withInput

redirect()->back()->with('status','My Status')->withInput();

spyworld left a reply on PHP-vars-to-Js Validation Errors

try to use dd to debug session message.

27 Oct
3 years ago

spyworld started a new conversation Remove Validation Message

This is default message. I try to remove postal require message.

  • The address field is required.
  • The postal field is required.
  • The state field is required.

I go to "resources/lang/en/validation.php". And modify to:


        'postal' => [
            'required' => '',
        ],


It will become:

* The address field is required.
* 
* The state field is required.


How to completely remove the message?