Member Since 4 Years Ago

Experience Points 221,115
Experience Level 45

3,885 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 324
Best Reply Awards 225
Best Reply
  • 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.


    Earned if you are a paying Laracasts subscriber.

  • lifer-token Created with Sketch.


    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.

14 Aug
1 month ago

jekinney left a reply on How To Send PDF Files Using QUEUES?

Do this quite a bit. Laravel has helpers for attachments which if you use, shouldn't be an issue.

But as @bobbybouwmann stated the files need to be available at the time the email is sent to attach it to.

Next time, probably easier to help if you post the error and/or exact issue you're having. Laravel makes it really easy if you use the helpers to send emails with any data and attachments.

FYI every email service uses Queues to send emails, even MS Exchange Server. So it a normal thing.

jekinney left a reply on How To Generate Random(6) Numbers For Each Insert Into Database

Don't normally link Wikipedia, but in this case, it's pretty accurate:

I didn't read all the replies just more of an FYI for others.

There are two issues with random.

  1. Eventually, you will run out. Most obvious and easy to get around with some thought and deleting unused rows
  2. Overhead to ensure the number is truly random. This is mostly overlooked. So if you need to verify on millions of records and use a lot of traffic........
11 Jun
3 months ago

jekinney left a reply on Laravel 5.8 Override Email Validation / Use 5.7 Rules

Email validation is about the easiest there is and built into PHP. If 5.8 doesn't fit you need, create a custom rule and add the code.

filter_var($email, FILTER_VALIDATE_EMAIL)

jekinney left a reply on Using `whereHas` Across Two Databases

@kTat You can set the database connection per model:

protected $connection= 'second_db_connection';

and you can use the:


@staudenmeir Not a true statement.

14 May
4 months ago

jekinney left a reply on Eloquent Query Returns A Field As Null When It Should Not Be


FYI Those are not eloquent queries, they are query builder queries. Sometimes a HUGE difference.

jekinney left a reply on Auto Send Email

Need to post your code with three back ticks. probably not pulling in a namespace you need.

30 Apr
4 months ago

jekinney left a reply on How To Dynamically Handle Role Permissions

Similar to what @robstar stated. If you really need dynamic you have to figure out your workflow (assuming that is your question too) meaning you need to tie into some events and listen to update things as needed.

Example: You have a basic cms where you can create pages and menus. When you create a page and menu link you also trigger a permission(s) to be created and assigned to admin user or role at least for maybe editing that page. And assign roles or users or even guest (anyone) permissions to view. So you are not hard coding the permission persay but on request seeing if a relationship exists to allow access.

polymorphic relationships help a lot in your permission table along with a type 'create', 'edit', 'read', 'delete' etc.

29 Jan
7 months ago

jekinney left a reply on Updated Event Not Triggered

Because the first is updating the $harvet.


$nextaction = $harvest->actions()->firstWhere('status', 'pending')
25 Jan
7 months ago

jekinney left a reply on Track Bounces With Laravel Mailer


You can if you need to, but they also offer webhooks. The mail may not fire off immediately as it sits in Mailguns queue. They do offer a webhook that will get hit when it is finished processing which will reduce you pinging Mailgun every second waiting.

22 Jan
7 months ago

jekinney left a reply on Track Bounces With Laravel Mailer

@moprocto as @snapey stated. Your mail provider generally has this data. Usually, when you send an email you get some type of id back along with a processing code. I have seen the use of webhooks that will trigger when a response to set by the mail provider so you don't have to constantly check (hit the api requesting status code till you get a code you want to process).

In other words, check to docs with the provider you are using. If you are using some other (on-prem service) need to get with the server admin.

on a side note: many are starting to trigger webhooks when a user opens and/or triggers the mail as spam). All have to have a way for a user to unsubscribe, so check for those codes too. They don't always notify you (yet) when this happens, just won't send any mail, but this is valuable information to store in case the user can't get emails.

21 Jan
7 months ago

jekinney left a reply on Laravel App For Web And Api

Resources too. Helps maintain your allowed data via ajax (think fractal)

jekinney left a reply on Lumens Tutorials?

@zabius Actually that is arguable. As it's intended for microservices (not auth etc built in) and laravel has api resources (think fractal but better) now etc. Most people, including Tayler, recommend full laravel except for small services. I personally use to use Lumen a lot for microservices within my servers (like in a VM or docker with limited resources) but nowadays with AWS and Azure (etc) offering microservers within your main server generally for free, no reason to anymore for me and my clients. Though still use cases.

More to the point, all laravel and PHP works except for routes have some limitations and no auth.

17 Jan
7 months ago

jekinney left a reply on Laravel 5.6 - How To Authenticate API Using Sessions For Same Folder SPA?

@wonka That is not how it is supposed to work at all. When you refresh the page you lose all your data that javascript is using. If your front end is all javascript use api authentication. Which case if you are using auth:api you have access to auth()->user() in the backend. But you still need to set up storing the token (and other data) on the session for your javascript app. literally thousands of tutorials for this.

Here is a basic for backend:

I believe Jeffrey has a vue one for the frontend, even with React, the premise is the same.

10 Jan
8 months ago

jekinney left a reply on Laravel Mix Minify But Copy Un-minified Version

mix.js('resources/js/app.js', 'public/js')

The default already copies the file into the public folder as app.js.

So makes sense then:

mix.js('resources/assets/js/dropzone.js', 'public/js')

would create a dropzone.js file in public for you. Rest is really irrelevant if you minify on deploy anyways.

You can keep adding files as needed:

mix.js('resources/assets/js/dropzone.js', 'public/js')->js('resources/assets/js/app.js', 'public/js')

jekinney left a reply on Limit Attendance Records Just One Per Day

As @hfalucas stated should do the trick. In your loop check if the latest date is equal to the date your putting in. If it does handle the "exception" as your requirements are to handle it.

If your requirements are just don't update then you can use a more efficient query by getting users that do NOT have attendance today or the like.

26 Nov
9 months ago

jekinney left a reply on Eloquent Relationships With Multiple Models.


If the reports are timed (scheduled) I would generate a report and save the data to the database. That way you have a date to start the next report (last reports ending timestamp) to keep adding to your data in new reports. Limits the look up and reduces load etc.

Stream: Pretty common stuff and you probably really are overthinking it. Just get a count and or use dates for time period counts. Depending on traffic load, this is definitely a use case for qued events or jobs to fire when a user does something with a stream. Mater of fact Jeffery has a video here about using jsvideo player that has some logging ideas. Personally, I have had the opportunity to log and track videos from users too along with reports. What I ended up doing was tracking like you are but also has a log where is tracked a user's actions (stop, fast forward, paused, finished etc) via api triggers. Each request raised event and went through listeners do each listener logged the event properly (about 10 ish? listeners). The last listener dealt with updating stats on a video. The video table had stat columns like views, unique views, finishes, pauses, etc. to easily calculate states without grabbing 1,000,000,000 of rows. From my experience generating live stats will melt your database and isn't cost-effective, but rolling stats where you have some type of summary and adding or subtracting is the way to go.

Most, all I have worked on, e-commerce and inventory system has a summary table that has in-stock, sold and pending (not always pending) quality counts even if in-stock is different prices and suppliers etc, instead of calculating in-stock numbers on the fly which can be expensive if you have many stores with a POS (point of sale software) that is constantly updating or e-commerce that is updating the quantities constantly. Plus send out low-stock alerts etc.

I'm never afraid to add tables for reports and stats as needed, generally better performance in the long run and no need to add later.

01 Nov
10 months ago

jekinney left a reply on Laravel-5.6 Error: Creating Default Object From Empty Value

    'tag' => 'required',

jekinney left a reply on How Do You Properly Check If A Record Exists?

Add to @click post:

Profile::where('propertyid', '=', $propertyid)->first();

Returns null if nothing is found, as mentioned you have a few "laravel" methods available.

$profile = Profile::where('propertyid', '=', $propertyid)->first();

if ( $profile->isEmpty() ) {


// or 

if ( $profile->isNotEmpty() ) {


PHP way:

$profile = Profile::where('propertyid', '=', $propertyid)->first();

if ( is_nulL($profile) ) {


if ( $profile = Profile::where('propertyid', '=', $propertyid)->first()) {
    // If profile exists will assign profile to $profile and you have it available here

if ( count( $profile ) === 1 ) {

11 Oct
11 months ago

jekinney left a reply on Laravel And Vue - Web / Auth Middleware Is Pushing Out My Users Randomly.

Hard to describe without a picture... lol

SO each api call to laravel should be validated serverside and only server side.

Any route request using Vue router, validation should be validated with Vue.

So each handles its own validation. For example a basic show page you validate via before routing in Vue. Then allow access to the page. If the page requires a user to be logged in, verify the token in the session storage (or vuex method) and expiration isn't expired of the token.

As the page loads, if an api calls are sent, they will be validated by laravel. So if the api requires the user to be logged in, you must have the authorization header with the token. Otherwise, you will get errors and the user isn't authenticated.

As you see they work in tandem. So I verify token and auth before loading the page, which then verifies my header is set properly for smooth and error-free transitions between pages/routing.

What I see and have done in the past is rely on one validation\auth and not both which leads to bugs. Also setting the token to be saved and proper recovery for each request to set the header (70% of the time that is the issue). Lastly not paying attention to the expiration timestamp of the token, obviously after it's expired your user is "kicked" out.

To solve the above issues I set up my before route file in Vue to check my vuex getter for the token and expiration. If empty, look in session data and run the vuex mutation to set it again (page refresh will clear it out of vuex). Then check expiration, if close to expiration (within an hour for example) close to expired I run an api call in the background to get a new token and update the session data and set the new data in vuex. Obviously, keep validation and auth separated where they need to be and have had very few issues.

jekinney left a reply on Querybuilder Result Using ->first() Can't Be Used...

You're not showing enough code. The above should work, but very redundant. Something you are doing after assigning the name to abc variable is causing an issue.

Also, wrap your code in three backticks.

Code here

jekinney left a reply on How To Solve Problems Of Deleting From Orders Or Products


 'qty' => 'required|between:0,255',
// or

 'qty' => 'required|min:0|max:255',

Your not performing really any checks on your queried data, that you still will need to do to be sure of the quantity available etc. But the validation of negative numbers is above.

jekinney left a reply on Integrating Facebook Page_insights With Laravel

Set up models for a set of api calls ( set mean same data ). A model's data doesn't have to be a database, it can be from anywhere.

Learn some guzzle calls etc to get the data from the api urls. You may want to wrap each call in a function, I generally try to simulate Eloquent functions for consistency.

Than rest should be the same as any other data model in laravel.

Facebook docs are amazing and might have php sdk already, which might make it easier (sometimes).

jekinney left a reply on How To Make S3 Images For Google Page Speed Friendly

???? Your question is very generic.

What are you really trying to do? Maximum speed is use a CDN and not s3.

Also assuming your setting your cache headers correctly as to reduce requests and use cached image files (default checks every refresh, but should be set to not check for x-amount of minutes).

Also assuming your images are sized correctly and in your img tag you set proper src for the browser size to call the correct url for the default size.

jekinney left a reply on Passing Post Id And User Id To The Create Controller When Someone Create A Comment

Few ways, I'll address it as basic as possible:

If you are using an API and using the auth:api middleware you have access to the authenticated user:

auth()->user() // full user model

auth()->id() // obviously just the id

Another option (not recommended as it can be changed) is to add the user id to a hidden input. This will need to be validated by auth() and request exists validation.

Post id you can pass in as a URL param


Or a hidden input field (generally used), once again need to use exists validation.

I also strongly suggest for maximum security balance is use uid's or uuid's instead of id's. This just keeps the average person from guessing a private or a post that they aren't suppose to have access too. Might be overkill depending on usage.

10 Oct
11 months ago

jekinney left a reply on Named Route With Multiple Parameters

Either way, you still ran out of memory. So either you have a loop never ending somewhere or a crazy query. Either way, your question answers its self with what you have provided.

Your route isn't the issue, some code executed somewhere is the issue. DD is your best friend

jekinney left a reply on Laravel And Vue - Web / Auth Middleware Is Pushing Out My Users Randomly.

Vue should be taking care of authentication for routes. Any API calls then you set the auth header and should be good.

If you are trying to authenticate both Vue routes and API routes server side and our setting your self up for crazy bugs. With Vue you should be checking every route request if your session is set (or vuex or another method) locally only. Then when they send a request, for example, create some data, then you make sure auth header is set with the token and send your request.

99% sure your header isn't set correctly

jekinney left a reply on ID Does Not Pass From View To Controller

People still use form helpers?

Store method with route model binding?

Did you:

public function store(Contact $contact, Request $request)
    dd( $contact);

If null or empty then your route is written wrong.

// Note contact not id
Route::post('/store/{contact}, 'Some [email protected]');

Also check out the default update method, and notice anything different?

public function update(Request $request, Model $model)

The order may not have anything to do with it?

jekinney left a reply on Consuming Your API With JavaScript - Issue


You obviously skipped a step somewhere.

If you are using postman, if you are hitting the middleware and not authenticated you should be getting an 501 code.

For first code section, you put middleware in web, you should be in API.

Check your config/auth and set to passport?

If all else fails try

 Route::prefix('blog')->namespace('Blog')->group( function () {

    Route::prefix('category')->group( function() {
        Route::get('/list/full', '[email protected]')->middleware(['auth:api', 'permission:blog-categories,blog-articles']);

using the middleware in your API routes file (notice the array syntax) don' t worry about permissions that is a custome middleware on app I am working on now).

jekinney left a reply on Consuming Your API With JavaScript - Issue

Check out this tutorial. If you like it I suggest bookmarking it. Will work with 5.7 btw.

I use it pretty much verbatim for all my API projects.

Not really sure what CreateFreshApiToken has to do with it (it doesn't).

Also be sure postman is set up correctly. I set up presets like:

My login example:

Route : /api/auth/login

Tests tab (this will set the enviroment variables. NOTE on token, my tokens come back with Bearer already concatinated on, different then tutorial above):

var data = JSON.parse( responseBody );
// any other variables you need set

Create an environment (upper right) with expires and token. Initial values empty.

Make sure you new enviroment is selected

Now back to Headers tab, on the right click Presets and manage presets:

I create two, first one I call basic then click "bulk-edit":


the second one I call basic w/auth and once again click "bulk-edit":


The token in {{ }} is the enviroment variable and is set automaticly when you "login"

Hope that helps!

jekinney left a reply on Saving An Array Into A JSON Column In A MySQL Database


You have a valid point and good catch, I was trying to be quick, but you can inject PHP in javascript though not recommended (use props or data attribute etc.)

JSON.parse( {{ $test->body }} )

jekinney left a reply on Laravel Form Build Json.

That is an extremely generic question. You have any experience with JSON or what have you tried. All you need to do is utilize PHP to encode and decode (which will stringify or set as an array) but you may want JSON to the frontend and let javascript parse the JSON?

Try to be more specific, hard to find someone to do your work for you and google shows a butt load of tutorials.

jekinney left a reply on How Does "retry_after" Actually Work?

Over on the laravel docs under prologue, you have API documentation.

This will list all the classes and functions etc.

So if you look at the right side, very tiny "at line68" is a link to the source code on github.

Obviously, you need to also track down the called functions too.

jekinney left a reply on Cron Tasks Backend/Frontend Setup

CRON is not a windows program but a Unix and Linux program.

Here is the first thing I found using the google machine:

Windows does have a scheduler program but usually requires user interaction to set up (permissions etc) via its gui.

Good luck!!!!!

jekinney left a reply on Saving An Array Into A JSON Column In A MySQL Database

First what you have in your example is (artisan command) is a string version of JSON.

This test was run in Postman as a post request with no special headers and a payload (body) of:

    "body": {
            "tasks" : [
                        "task" : "Direct or coordinate an organization's financial or budget                activities to fund operations, maximize investments, or increase efficiency."
                        "task" : "Confer with board members, organization officials, or staff members to discuss issues, coordinate activities, or resolve problems."

So if you do this:

Route::post('/', function (Request $request) {

    $test = Test::create([
        'body' => json_encode( $request->body )

    return response()->json($test->body);

Your response will look like:

"{\"tasks\":[{\"task\":\"Direct or coordinate an organization's financial or budget activities to fund operations, maximize investments, or increase efficiency.\"},{\"task\":\"Confer with board members, organization officials, or staff members to discuss issues, coordinate activities, or resolve problems.\"}]}"

Which is what you don't want.

On the other hand:

Route::post('/', function (Request $request) {

    $test = Test::create([
        'body' => json_encode( $request->body )

    return $test->body;


{"tasks":[{"task":"Direct or coordinate an organization's financial or budget activities to fund operations, maximize investments, or increase efficiency."},{"task":"Confer with board members, organization officials, or staff members to discuss issues, coordinate activities, or resolve problems."}]}

which is what you are looking for.

Issues to look for:

By default, laravel responds with JSON data if you return data not put into a view. So you (as above) need to ensure it is sent as JSON not a string version of JSON.

Notice I insert as json_encode(). If not the Illuminate\Http\Request sets JSON as an array:

array:1 [
  "tasks" => array:2 [
    0 => array:1 [
      "task" => "Direct or coordinate an organization's financial or budget activities to fund operations, maximize investments, or increase efficiency."
    1 => array:1 [
      "task" => "Confer with board members, organization officials, or staff members to discuss issues, coordinate activities, or resolve problems."

But if I json_encode() looks like:

"{"tasks":[{"task":"Direct or coordinate an organization's financial or budget activities to fund operations, maximize investments, or increase efficiency."},{"task":"Confer with board members, organization officials, or staff members to discuss issues, coordinate activities, or resolve problems."}]}"

Which is a stringified version.

Like above, don't be afraid to create a new Laravel project just to play around. Took me less than 5 minutes to play as above.

End of the day, you are fighting defaults from laravel. I assume you're newer at Laravel as you not using Eloquent. Don't be afraid to look at source code. Taylor left a lot of comments to explain a lot.

Also as a side note the string version can be consumed in javascript with:


jekinney left a reply on Phpunit Testing Form Validation

Validation returns status code 422 with message bag. You can simply assert you get a status code of 422. To further dig down you can assert you see the specific error message, though the validation is assumed to work as it is tested as part of the framework.

Example: You may test you create a new model instance and return proper data. but you usually don't test Eloquents create method.

So @Tray2 stated you generally test the happy path. Maybe a few bug type tests if a user does something weird, but that is generally end to end testing via open browser, have it fill out form etc.

28 Aug
1 year ago

jekinney left a reply on Laravel Update Without Passing ID

On your create method (assuming ajax) return the data and add the id to your javascript data.

What your doing is common as the timestamps are important to be accurate. You can also use UpdateOrCreate (a few others too).

jekinney left a reply on Add Multiple Rows While Migration

What I do in this type of situation is create my own command via make:command. In the command call your migration and applicable seeders.

That way you call a single command with an expressive name. IE: refresh:withCarsData

23 Jul
1 year ago

jekinney left a reply on What Is A Right Way To Authenticate SPA JavaScript Application? (API)

Usually you have two types of authentication on a spa.

Application its self (domain to domain)


Application (CORS) can be authenticated on the api server. Generally required now.

User is generally password grant (or JWT, same premise and structure). You can configure them to be extremely strict and "safe" but sacrifice performance as each request requires multiple checks, data transfers and hashing/un-hashing.

Other types are used in different circumstances etc. You generally only keep secret keys server side. So server to server requests.

22 Jul
1 year ago

jekinney left a reply on Form Request Refreshing Page

You are failing your permission validation, you don't see it because your not displaying errors on your page.

Your checkbox is wrong, each check box requires a value to pass into permissions[]. HTML 101.

Secondly, if your new, test NOT using a formRequest class and do validation off the $request class ($request->validate([]): and use dd() to check your data etc.

Test by Injecting Request instead of RoleRequest and

dd( $request->permissions);

Bet it will be null or [].

jekinney left a reply on Select Multiple Values For Column

Your question and error message are two different issues.

As far as the error you need to look over the paginate function in the docs. Below is an example out of the docs. Notice a difference? Hint: once you execute a query you either get a collection or a model back and collection doesn't have a pagination method!

     * Show all of the users for the application.
     * @return Response
    public function index()
        $users = DB::table('users')->paginate(15);

        return view('user.index', ['users' => $users]);
25 May
1 year ago

jekinney left a reply on Getting Monthly Sum For Specific Year

@randi I have not used vue charts as of yet.

28 Apr
1 year ago

jekinney left a reply on How To Remove Extra Fields While Returning Date

Look at the carbon docs to format the date as needed. Common ones are ->diffForHumons() and toDateTimeString().

04 Apr
1 year ago

jekinney left a reply on Multiple Buttons In One Form Fires All Methods

@Nash has the correct answer IMO.

jekinney left a reply on Sending Emails To A User That Isn't Logged In

@stargatesg1 Obviously your are entitled to your opinion, but compared to even just a few years ago email in laravel is stupid simple if you not only read the docs, but understand how stuff works. If you can't get email to work in laravel, good luck with old PHP and/or swift mailer package,

On-Demand Notifications
Sometimes you may need to send a notification to someone who is not stored as a "user" of your application. Using the Notification::route method, you may specify ad-hoc notification routing information before sending the notification:

Notification::route('mail', '[email protected]')
            ->route('nexmo', '5555555555')
            ->notify(new InvoicePaid($invoice));

07 Dec
1 year ago

jekinney left a reply on How To Use Left Join In Eloquent

@w1n78 WOW, 2 years old..

The has() method will not return a Shoe object (in your case) if it doesn't have a image. So it still works as intended. Looks like your case you want the Shoe no matter what. So different use case.

20 Nov
1 year ago

jekinney left a reply on Use Timestamp As Primary Key


Time stamps are strings, Laravel expects integers by default.

  protected $primaryKey = 'uid';
    protected $casts = [
        'uid' => 'string',

Obviously the above is for a uid not ID, but concept is the same.

jekinney left a reply on ERR_TOO_MANY_REDIRECTS In My Laravel

Usually means you have a redirect loop.

If you redirect a non-authenticated user to a route that requires authentication will trigger that error (for example).

jekinney left a reply on How To Update Json Field In A List Of Items

@strejo @cbh

Create a text column (or medium text etc). use php to json_encode() the data.

this puts the data as a json string, which the db will take. When you parse it out you can json_decode into a php array or pass it to your javascript and parse it there.

    "settings": [
        {"requires": "auth"},
        {"permissions": "can_create"}

$cert->create(['settings' => json_encode( $request->settings )]);
$settings = json_decode($cert->settings, true); 
 // True boolean tells php to return an array


[ 'requires' => 'auth', 'permission' => 'can_create']
16 Oct
1 year ago

jekinney left a reply on This.$nextTick Not Working The Way Expected

I tend to lean as @wilkeglobal stated or use a computed property. The nextick will run faster (obviously) then setting data.

Another way is to use Promise.resolve() in your then(). and trigger the function else where.

PageSetUp() {
    this.getRegions().then(response => {
        // check if response etc. will not process until get regions returns data.
getRegions() {

    let countryId = this.form.country_id;

    if (countryId) {
        axios.get('/getRegion/' + countryId)
            .then(response => {
                this.regions =;

                Promise.resolve( // Promise here, 
            .catch(error => {

jekinney left a reply on [5.4] Queue Worker Memory Leak

Keep in mind Ubuntu (Linux in general) while idling will use a lot of memory. The OS doesn't dump data out until it needs the space. So if you are comparing Windows and Ubuntu, Ubuntu will always "look" like it's using a lot of memory, where in fact it just doesn't dump until it needs to. So you really need to "test" when your actually processing jobs.