CREATE TABLE new-database-name.new-table-name AS SELECT * FROM old-database.old-table-name;
CREATE TABLE new-database-name.new-table-name AS SELECT * FROM old-database.old-table-name;
1) php artisan make:command AutoBirthDayWish
2) php artisan make:mail BirthDayWish
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class BirthDayWish extends Mailable
{
use Queueable, SerializesModels;
public $user;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($user)
{
$this->user = $user;
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
return $this->subject('Happy Birthday '. $this->user->name)
->view('emails.birthdayWish');
}
}
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Mail;
use App\Mail\BirthDayWish;
use App\Models\User;
class AutoBirthDayWish extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'auto:birthdaywith';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$users = User::whereMonth('birthdate', date('m'))
->whereDay('birthdate', date('d'))
->get();
if ($users->count() > 0) {
foreach ($users as $user) {
Mail::to($user)->send(new BirthDayWish($user));
}
}
return 0;
}
}
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('auto:birthdaywith')->daily();
}
/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');
require base_path('routes/console.php');
}
}
1) install laravel
2) install laravel/ui
3) install Auth
4) install vue
npm install vue@next @vue/compiler-sfc vue-loader@next
npm install vue-router@4
npm install @vitejs/plugin-vue
vite.config.js
import { defineConfig } from 'vite';
import laravel from 'laravel-vite-plugin';
import vue from '@vitejs/plugin-vue';
export default defineConfig({
plugins: [
laravel(['resources/js/app.js','resources/css/app.css']),
vue({
template: {
transformAssetUrls: {
// The Vue plugin will re-write asset URLs, when referenced
// in Single File Components, to point to the Laravel web
// server. Setting this to `null` allows the Laravel plugin
// to instead re-write asset URLs to point to the Vite
// server instead.
base: null,
// The Vue plugin will parse absolute URLs and treat them
// as absolute paths to files on disk. Setting this to
// `false` will leave absolute URLs un-touched so they can
// reference assets in the public directory as expected.
includeAbsolute: false,
},
},
}),
],
resolve: {
alias: {
vue: 'vue/dist/vue.esm-bundler.js',
},
},
});
app.js
import './bootstrap';
import {createApp} from 'vue'
import * as VueRouter from 'vue-router'
import ExampleComponent from './components/home.vue'
import AboutComponent from './components/about.vue'
const routes = [
{path: '/home', component: ExampleComponent},
{path: '/about', component: AboutComponent},
]
const router = VueRouter.createRouter({
history: VueRouter.createWebHistory('/ilhdb4/public/'),
routes,
})
const app = createApp({})
app.use(router)
app.mount('#app')
ext4
file system on that volume. In this example, the shared partition /dev/sdb1
is used to store the LVM physical volume from which the LVM logical volume will be created.
Note
/dev/sdb1
partition is storage that is shared, you perform this procedure on one node only,
/dev/sdb1
.
[root@z1 ~]# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created
my_vg
that consists of the physical volume /dev/sdb1
.
[root@z1 ~]# vgcreate my_vg /dev/sdb1
Volume group "my_vg" successfully created
my_vg
.
[root@z1 ~]# lvcreate -L450 -n my_lv my_vg
Rounding up size to full physical extent 452.00 MiB
Logical volume "my_lv" created
lvs
command to display the logical volume.
[root@z1 ~]# lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
my_lv my_vg -wi-a---- 452.00m
...
ext4
file system on the logical volume my_lv
.
[root@z1 ~]# mkfs.ext4 /dev/my_vg/my_lv
mke2fs 1.42.7 (21-Jan-2013)
Filesystem label=
OS type: Linux
import moment from 'moment'
methods: {
format_date(value){
if (value) {
return moment(String(value)).format('YYYYMMDD')
}
},
},
Then:
format_date(date)