Sign in

This package pretty-routes add a route:pretty command to your artisan console for pretty route output.

Thanks to Alex Wulf!

Installation:

Usage:


How to run an .ipynb Jupyter Notebook from terminal

First you need to convert the ipynb file to Python:

Then run it in Terminal using:


Numpy array has .size attribute. If it returns zero it means there are no elements in the array.

Suppose A is a numpy array.


When testing Laravel applications, you may wish to “mock” certain aspects of your application so they are not actually executed during a given test.

Goal:

Instructing the Laravel IOC container to use our mocked instance of the object instead of constructing a real object of a class.

How:

We need a bridge between Mockery and Laravel Service Container.

Description:

In vendor directory Laravel > Framework > Src > Illuminate > Foundation > Testing > Concerns there are some traits.

If you have a look at the trait InteractsWithContainer.php


For phpunit test you need config a phpunit.xml file.
You can set this little config in phpunit.xml and see how in the next run your, last failed tests will be run first.



Installing MailHog

Enabling:

Enable the service via running the command below:

This tells Homebrew to setup a background service. Then MailHog is always running on your machine. As long as Homebrew is running, you won’t need to manually start anything, .

Now, you can visit MailHog application under the following in a browser:

For localhost you need to set two variable in Laravel .env file.


Suppose there are two models Patient and also Exam and the relationship between them is One To Many, I mean each patient can have many exams.

Patient Model


I’ve just installed Laravel 8 besides Laravel Breeze and in auth.php file in the routes directory, I see how we should import the namespace the of the controllers.

As you see you for declaration the store action, we have to put a bracket around the controller and the action like below


Hat tip:

I just learned about github1s.com, which allows you to use VS Code in the browser to navigate GitHub repos.
Just add 1s after the GitHub domain.

So, to browse the following repo:

visit this:

This is amazing!

Panjeh

Posting daily about Python, Laravel, Livewire, Nuclear Physicist PhD

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store