jlrdw

jlrdw

Member Since 4 Years Ago

Experience Points
411,560
Total
Experience

0 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
149
Lessons
Completed
Best Reply Awards
436
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.

Level 50
411,560 XP
Nov
18
11 hours ago
Activity icon

Replied to Help In Optimize Solution Of DB CURD Operation.

If you're getting it to show correctly in your edit form, just have an update method for the new data. I probably wouldn't use the same create method.

If you're using the updateorcreate method it should work but you have to foreach these separately.

Activity icon

Replied to Help In Optimize Solution Of DB CURD Operation.

I am not totally understanding but if you are talking about showing in a dropdown what was previously selected and stored in the database, you naturally have to foreach over those values and determine what was in the database and in turn show those values selected.

Use a ternary statement.

Activity icon

Replied to Pass Object Via Route To Controller Page Not Found

In one of Jeffrey's free from scratch videos he covers route model binding.

He also covers if you going to change which field to use.

Activity icon

Replied to How To Use Class From .so File Of PHP Extension In Controller ?

Or you could just require it, or https://stackoverflow.com/questions/21519919/composer-install-pear-package

I haven't checked myself but have you by chance looked at the pear site to see if they talk about installing their packages via composer.

It wouldn't hurt for you to check that yourself.

Nov
17
1 day ago
Activity icon

Replied to How To Use Class From .so File Of PHP Extension In Controller ?

Did you try above leaving out the php tags, or appling a use statement: It should work in a controller just like you did:

$mecab = new \MeCab\Tagger();
$parsed = $mecab->parse('this is test');
var_dump($parsed);
Activity icon

Replied to Laravel Rest Api Web And Mobile

An alternative is to make your current app mobile friendly. Bootstrap for example handles the media queries for you. The trick is to optimize images and only show so many for page, and use pagination.

Google has a mobile friendly test tool: https://search.google.com/test/mobile-friendly?utm_source=support.google.com/webmasters/&utm_medium=referral&utm_campaign=%206352293

Activity icon

Replied to How To Refactor This Relationship

Instead of added fields, maybe another related discount table. Hard to picture someone's code here on a post.

Activity icon

Replied to How To Use Class From .so File Of PHP Extension In Controller ?

What are you actually trying to do and load. What is the actual namespace.

Activity icon

Replied to Illuminate/database (+ Migrations) Outside Laravel

Are you saying you already know how to set up the database taken from here. https://github.com/illuminate/database/tree/6.x

Which I've used standalone also. I didn't worry about migrations, rather I just used a front. In my case I use sqlyog, but there are others.

Seems migrations are in that package.

Curious, if you need that much, why not just laravel all the way.

Activity icon

Replied to How Do I Redirect To Another Webpage Using Js

I'd like to also suggest you take some basic JavaScript tutorials.

Can you mark this as answered.

Nov
16
2 days ago
Activity icon

Replied to Calling View

Where did you get this code.

Activity icon

Replied to How To Do Local Development Of Huge Website (like Facebook)

A large site like that users several Technologies to include Java, C++, PHP, Erlang and Python, and more.

So keep that in mind.

But if the database is 1 PB big then how is this done?

Don't let a database grow too large learn how to Archive last year's, or old data to another database.

Activity icon

Replied to How To Get The Corel Draw Raw File From An Installed Corel Draw On My System

Do you mean like a client server type setup.

Their instructions and Licensing should explain this.

Activity icon

Replied to Help With Testing S3 Storage

Try a search on medium I think they have an article or two on S3 testing.

Activity icon

Awarded Best Reply on Pagination: How To Get Total Number Of Pages?

I want to display : Viewing Page 3 of 335.

I already did a guide for that very thing: https://laracasts.com/discuss/channels/guides/paginator-another-episode

Nov
15
3 days ago
Activity icon

Replied to Pagination: How To Get Total Number Of Pages?

I want to display : Viewing Page 3 of 335.

I already did a guide for that very thing: https://laracasts.com/discuss/channels/guides/paginator-another-episode

Activity icon

Replied to Ajax Method Not Working For Select State Field

In another post I referred you to some good stack Overflow articles.

I was hoping you could figure it out from there.

Also there were links to past dynamic dropdown answers from this very forum.

https://laracasts.com/discuss/channels/laravel/dynamic-dropdown-1

But in dynamic dropdowns it is obvious that you have to re query the data to repopulate your drop down using an on change event.

Edit: in the above statement meaning properly set up the correct queries.

Activity icon

Replied to Pagination: How To Get Total Number Of Pages?

Or Taylor has also done the simple math for you

$results->lastPage();

So in your example 2 above, would be 20.

Not available when using simplePaginate. Also, if using lengthaware you have to do some simple math yourself.

https://laracasts.com/discuss/channels/guides/manual-pagination-episode-3

https://laravel.com/docs/6.x/pagination#paginator-instance-methods

I just noticed, @thebigk when @nakov gave you the link to the paginator-instance-methods, you should have seen for yourself that lastPage is also the same as the number of pages.

Activity icon

Replied to Pass Form Data To Controller For JSON Post To External API

What also confuses me about the question is: if you are using a payment Gateway, their API would have specific instructions on exactly how to handle this.

For example if Guzzle was needed there would be an example of how they expect you to use Guzzle.

So really I am not sure what you are doing, but just saying it doesn't sound like an authorized payment Gateway, just an observation.

Edit: honest not trying to argue just saying I've never seen one of these apis not have instructions to follow.

Nov
14
4 days ago
Activity icon

Awarded Best Reply on Should I Be Worried About Soft Delete Affecting Speed?

In the millions, yes. Set a job to delete them if older than X, or archive in a backup database table.

Activity icon

Replied to NotFoundHttpException In RouteCollection.php Line 179

return view('clientes.formulario', compact('cliente'));

Maybe do not know all of your code.

Activity icon

Replied to Laravel Envoy + Vapor

I find it strange that envoy isn't mentioned in the vapor docs. If it is it's not in search. You would think there would be a little on what vapor does and does not replace. I mean there's https://docs.vapor.build/1.0/resources/queues.html#introduction

I would suggest there be a "master document" that states what can be used with what.

Example: If envoy is not to be used with vapor, or not needed with vapor. A sentence or two explaining this and why or why not.

Ditto for other laravel ecosystem items. Just a thought.

Activity icon

Replied to Laravel Nova Nested Forms

Just use a laravel resource normally for this. If you want it to start from nova as the admin area, fine. Just have the proper authorized link to run the code normally as if you were not using nova. Nova sits on top of laravel, so get your usage out of laravel as needed.

Activity icon

Replied to Database Design / Schema For A Vet CLinic's Laboratory.

A little more to it, there's A/R, A/P reports, etc, also have a look at:

https://laracasts.com/discuss/channels/general-discussion/rental-management-db-schema

Edit: If you do not already have one, get yourself a good query designer.

And this is a good site: http://www.mysqltutorial.org/

Activity icon

Replied to Should I Be Worried About Soft Delete Affecting Speed?

In the millions, yes. Set a job to delete them if older than X, or archive in a backup database table.

Activity icon

Replied to Functions Works With Direct Route But Not When Referenced By Another Function

Why would you do

Route::get('/property/showdash/{propertyid}',['as' => 'property.showdash', 'uses' => '[email protected]']);
Activity icon

Replied to Pass Form Data To Controller For JSON Post To External API

But the Gateway would not be asking for such data.

What Gateway are you using that would ask for such data I'm curious I'd like to look them up and do more research.

If you're just practicing API stuff maybe you could practice with the simpler fields. Just a thought.

PayPal has practice accounts

https://developer.paypal.com/docs/classic/payflow/test-hosted-pages/

Other gateways should be very similar.

Activity icon

Replied to Text Limit

The s.o. article shows how to use a assessor and mutator.

Activity icon

Replied to Pass Form Data To Controller For JSON Post To External API

Any credit card information is done on the payment Gateway, not your system, you really need to fix that first.

Then the payment Gateway will have API instructions to follow.

Activity icon

Replied to Is It Worth Following The 5.7 Laravel Tutorials If I've Installed Version 6?

Yes watch some of those he covers the basic Authentication and authorization usage, those aren't in the 6.0 videos yet.

Just see what's in the videos and use good judgment whether you need or not need to view it.

Also always view the what's new in series.

Activity icon

Awarded Best Reply on GET Request To Correspond User_id On Form Submit

You have to submit that form and then get the user_id. On that form you already have user_id, how is that. You don't know what will be selected from the drop-down yet.

You probably going to need another method to handle this form request.

If you haven't had a chance, and like I said Jeffrey covers some of this basic crud in his free video series.

// validate as needed
$id = $request->input('user_id');  // Change $id to variable you want
//  Rest of code to query whatever you need for report
//  With the user_id you got from dropdown
// return a view to do whatever you need with results.
Activity icon

Replied to Video Does Not Appears

Do other videos play from other sources. Try to play a couple of YouTube videos just to see if that works.

Activity icon

Replied to Variable Value Is Not Passing To The View.

$clients = Client::get();

Fix that to all or what client you want.

Re-read the documentation on eloquent and eloquent relations.

Because from what you have it's hard to know what you actually want.

Activity icon

Awarded Best Reply on Nova - Clear Sorting

There's some code in this issue, check it out: https://github.com/laravel/nova-issues/issues/156

You could probably also add a custom button that returns the natural order or the order you want.

Nov
13
5 days ago
Activity icon

Replied to Laravel Ajax Validations

Any error send a response back and display in the ajax, or on the form, see: https://laracasts.com/discuss/channels/laravel/how-to-send-validation-errors-as-json-to-view?page=1

Your choice, have an error message there in the JS, or put them in the view.

Activity icon

Replied to Nova - Clear Sorting

There's some code in this issue, check it out: https://github.com/laravel/nova-issues/issues/156

You could probably also add a custom button that returns the natural order or the order you want.

Activity icon

Replied to Authetication Redirect And Error Catch

Check your middleware, the redirect is probably there, since you are also using custom stuff you may need to add a custom middlewae to handle your custom login. https://laravel.com/docs/6.x/middleware

You realize you need to build any flash messages yourself right, if using custom, it's not automatic. https://laravel.com/docs/6.x/redirects#redirecting-with-flashed-session-data

See this: https://laravel.com/docs/6.x/redirects#creating-redirects

Sometimes you may wish to redirect the user to their previous location, such as when a submitted form is invalid. You may do so by using the global back helper function. Since this feature utilizes the session, make sure the route calling the back function is using the web middleware group or has all of the session middleware applied:

////    Example from docs here //////
Route::post('user/profile', function () {
    // Validate the request...

    return back()->withInput();
});

Now look at out of box login, and get idea of how Jeffrey used this, Just duplicate those techniques also in your custom code.

The error messages are not automatic.

You have to put them there yourself.

Or

Look at login.blade.php and app.blade.php. Duplicate those, but rename to some custom names for you. Then study how Taylor made them work, then adjust as necessary in your custom stuff.

Activity icon

Replied to How To Filter The Relationship Attributes In Laravel

Adapt something like this

// start of your query
->whereBetween('price', [$min_price, $max_price])...
// ending of your query
Activity icon

Replied to How Can Update Stocks Table After Done A Sales

@emfinanga just to let you know Jeffrey also has free video training series that can help you out on some of these basics.

Activity icon

Replied to Syntax In If-statement Condition

@christophharms what are you talking about.

I said it's resolved

I was asking @amit123 please mark it as answered.

Sometimes if not marked answered a person may have a follow-up question.

Why would you say the opposite of what I said.

Did I phrase something wrong, I checked and I put:

is there any way you can show this answered