run all success commands then run
apt-get install -f
after that run all failed commands top to bottom and then run
apt-get install -f -> if succeed then it ask for root password
and then run
| package main | |
| import ( | |
| "bufio" | |
| "flag" | |
| "fmt" | |
| "log" | |
| "os" | |
| "sort" | |
| "strconv" |
| #!/bin/bash | |
| laravel new $1 | |
| # Change Dir | |
| cd $1 | |
| # Update .env | |
| sed -i "s/APP_NAME=Laravel/APP_NAME=$1/g" .env | |
| sed -i "s/DB_DATABASE=laravel/DB_DATABASE=$1/g" .env |
| # https://php.watch/articles/composer-gitattributes | |
| # Exclude build/test files from archive | |
| /.github export-ignore | |
| /.phive export-ignore | |
| /.psalm export-ignore | |
| /build export-ignore | |
| /docs export-ignore | |
| /examples export-ignore | |
| /phpstan export-ignore |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
| <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | |
| <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> | |
| </head> | |
| <body> |
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
run all success commands then run
apt-get install -f
after that run all failed commands top to bottom and then run
apt-get install -f -> if succeed then it ask for root password
and then run
$ ssh [email protected]
$ mkdir test
$ cd test
// PostsController.php
public function store(PostRequest $request)
{
$post = Post::create($request->validated());
$post->publish();
return redirect('/posts');
}Post extends Model
{
public function publish()
{
$this->published_at = now();
$this->save();
}
}// creating post
$post = Post::create($attributes);
// publish post
$post->published_at = now();
$post->save();