Return to site

Laravel Dev

broken image


Pre-order my Docker Laravel course for just $19! Containing 23 videos of premium content and set to release November 1st: In this. Laravel content on DEV. DEV is a community of 477,374 amazing developers. We're a place where coders share, stay up-to-date and grow their careers. PHP/Laravel Developer Senior Software Developer View more Jobs Post a Job. Laravel News Partners. Latest Laravel News View all news. Oct 15, 2020 Enlighten Your APIs With Auto-Generated Documentation. Oct 14, 2020 Laravel 8.10 Released. Oct 13, 2020 Laravel schedule:work Command, Valet Lite, and YouTube Q&A. If you install Laravel via Composer, this file will automatically be copied to.env. Otherwise, you should copy the file manually. Your.env file should not be committed to your application's source control, since each developer / server using your application could require a different environment configuration. Furthermore, this would be a.

  1. Laravel Developer
  2. Laravel Development
  3. Laravel Dev Environment

I'm going to ramble on a bit about my thought process and the laptop I ended up buying, but if you want to jump straight to the setup information, just scroll down to Setting It Up.

I recently felt the need to upgrade my laptop to one with a larger screen, but kept holding off because I wanted to have a good development workflow. I've always been a Mac enthusiast and was considering saving up for a MacBook Pro but the 15″ model would have been a significant investment.

Once I learned about WSL on Windows 10 and having used the OS at work, I knew my next laptop would be a Windows 10 PC. To those of you who aren't aware, WSL enables Linux to be installed on Windows 10 and it allows you to run the Linux distro of your choosing in parallel with Windows, i.e. without having to dual boot.

I did not require a state of the art computer for Laravel web development on Windows… the features I wanted were:

  1. 15.6″ screen
  2. 8GB RAM
  3. 256 SSD hard drive
  4. Intel i5 processor or an AMD equivalent
  5. UHD display

Lucky for me Comex 2019 was a week away so I held off and ended up buying an ASUS VivoBook 15 X512FJ that retails for SGD 999 for SGD 830 and got some additional freebies to boot. It wasn't a Macbook Pro 15″ with a retina display and more impressive specs, but it also didn't set me back SGD 3,499. The VivoBook came with a fingerprint sensor and it looked good to me as well so I didn't hesitate to make the purchase.

Setting It Up

The first step of course would be to activate WSL. I did this by running the following command through Windows PowerShell as an Administrator:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

The next step was to install the Linux distro through the Microsoft Store and I went with Ubutu 18.04 LTS as I was already familiar with it and never had any problems.

I then proceeded to install PHP 7.3, composer, mysql, redis, supervisor, node, npm and oh my zsh. There are a multitude of resources of how to do this online, so I'm sorry but I'm going to save myself the effort to add all the commands and provide you with the links instead.

The important thing though is I didn't install Apache but having used Laravel Valet on my Mac as well as on Ubuntu (valet-linux) and found the entire workflow of adding projects and accessing them from the browser a no brainer.

The one thing I have to point out is valet-linux does not work with WSL. Please use valet-wsl instead but don't forget to install the prerequisite Ubuntu packages.

Valet for WSL provides a way to quickly setup a development environment for Laravel using Valet in Windows Subsystem for Linux.

valeryan

By the way, I noticed I could not even do apt-get update after installation of valet-linux initially and had to add back the nameservers to fix this. Am not sure if this is even required if you install valet-wsl right away.

The last hurdle for me was automating the startup of the web stack upon launching the Ubuntu App after restarting Windows. Here is what I added to my ~/.zshrc file:

sudo valet start
sudo service supervisor start
sudo service redis-server start
sudo service mysql start
sudo supervisorctl start all

I used supervisor to launch Laravel Echo Server and Laravel Horizon upon boot. Please note that systemctl in not available in WSL based on what I read.

You will also need to add an entry into the Windows hosts file in order to access your web app on 127.0.0.1. Last but not least, in order to access your code in a text editor through Windows, you will need to store your code on the Windows file system by creating a sym link from WSL to Windows.

ln -s /mnt/c/Users/username/Documents/ Wso2 integration studio download.

You will then be able to use Sublime Text / Sublime Merge / etc through the Windows GUI but use the Ubuntu terminal for everything related to the server.

Laravel

I hope this post helps someone to set up their development environment on Windows!

Simple Docker development environments for Laravel.

Laravel Developer

Use It:

Why Vessel?

Vessel started as a bash script I put together to make working with Docker easier.

Laravel development services

I hope this post helps someone to set up their development environment on Windows!

Simple Docker development environments for Laravel.

Laravel Developer

Use It:

Why Vessel?

Vessel started as a bash script I put together to make working with Docker easier.

It all started because Docker commands are cumbersome to type. You end up in the CLI pretty often when hacking on Laravel projects - a typical workflow in Laravel involves creating controllers or models, creating and running migrations, running queue workers, adding more packages, and more!

I developed this workflow from my own daily use, and even created a free video series about it. However, I wanted to make something more official that everyone could easily use.

This goal of this project is to be as simple as possible while also giving people a glimpse into how Docker works. I hope you find Docker a really neat way to compartmentalize your projects, and make hacking on projects (on any machine) a breeze.

What's Included

The aim of this project is simplicity. It (only) includes:

Laravel Development

  • PHP 7.4
  • MySQL 5.7
  • Redis (latest)
  • NodeJS (latest), with NPM, Yarn, & Gulp

Laravel Dev Environment

If you need or want more technologies in your project, check out the docs on Customizing Vessel.





broken image