To undo a git stash
, it depends on what exactly you mean by “undo”:
git stash apply # or git stash pop
LARAVEL's resource classes allow you to expressively and easily transform your models and model collections into JSON.Basically you can generate a nice json formatted data right from Eloquent. Laravel's resource classes allow you to expressively and easily transform your models and model collections into JSON. Let’s learn how to generate api resources.Consider you have a user table in your database and you want to generate api resources for your User model.Run following command on your terminal window while being on laravel project root directory:
app/Http/Resources
directory of your application. Resources extend the Illuminate\Http\Resources\Json\JsonResource
class:#!/bin/bash | |
# Tutorial: Install a LAMP stack on an Azure Linux VM | |
# https://docs.microsoft.com/en-us/azure/virtual-machines/linux/tutorial-lamp-stack | |
# Create the VM Resource Group | |
az group create --name LAMP-STACK-RG --location westus2 | |
# Create the VM | |
az vm create \ |
#!/bin/bash | |
# Brew : The missing package manager for macOS | |
# https://brew.sh/ | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# Git | |
brew install git | |
git config --global core.autocrlf input |
FORGE_SITE_BRANCH=master #change this to the branch that is needed to be deployted | |
PROJECT_DIR="/var/www/html" # Path to Project directory | |
ENV_BKP_DIR="../" | |
cd $PROJECT_DIR | |
cp .env $ENV_BKP_DIR/.env.bkp | |
# Maintenance mode | |
php artisan down || true |
{ | |
"private": true, | |
"scripts": { | |
"dev": "npm run development", | |
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js", | |
"watch": "npm run development -- --watch", | |
"watch-poll": "npm run watch -- --watch-poll", | |
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js", | |
"prod": "npm run production", | |
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js" |
# PHP | |
# Test and package your PHP project. | |
# Add steps that run tests, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/php | |
pool: | |
vmImage: 'Ubuntu 16.04' | |
variables: | |
phpVersion: 7.2 |
#### | |
# ZSH function to auto-switch to correct Node version | |
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5 | |
# | |
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does. | |
# | |
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING. | |
# | |
# - Works correctly if your .nvmrc file contains something relaxed/generic, | |
# like "4" or "v12.0" or "stable". |
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
In your command-line run the following commands:
brew doctor
brew update