-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added seeders and migrations to keep up with Voyager changes
- Loading branch information
Showing
42 changed files
with
1,431 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,20 @@ | ||
<p align="center"><a href="https://devdojo.com/wave" target="_blank"><img src="https://cdn.devdojo.com/assets/img/github-wave-logo.svg" width="240"></a></p> | ||
# Deployment Instructions | ||
|
||
<p align="center"><a href="https://www.producthunt.com/posts/wave-2-0" target="_blank"><img src="https://cdn.devdojo.com/images/april2021/upvote-product-hunt-img.png" height="auto" width="auto"></a></p> | ||
## Migrating | ||
- Generate migrations for all tables | ||
|
||
## Introduction | ||
`php artisan migrate:generate` | ||
|
||
[Wave](https://devdojo.com/wave) is a Software as a Service Starter Kit that can help you build your next great idea 💰. Wave is built with [Laravel](https://laravel.com), [Voyager](https://voyager.devdojo.com), [TailwindCSS](https://tailwindcss.com), and a few other awesome technologies. Here are some of the awesome features ✨: | ||
- Or for one | ||
|
||
- [Authentication](https://wave.devdojo.com/docs/features/authentication) | ||
- [User Profiles](https://wave.devdojo.com/docs/features/user-profiles) | ||
- [User Impersonation](https://wave.devdojo.com/docs/features/user-impersonation) | ||
- [Subscriptions](https://wave.devdojo.com/docs/features/billing) | ||
- [Subscription Plans](https://wave.devdojo.com/docs/features/subscription-plans) | ||
- [User Roles](https://wave.devdojo.com/docs/features/user-roles) | ||
- [Notifications](https://wave.devdojo.com/docs/features/notifications) | ||
- [Announcements](https://wave.devdojo.com/docs/features/announcements) | ||
- [Fully Functional Blog](https://wave.devdojo.com/docs/features/blog) | ||
- [Out of the Box API](https://wave.devdojo.com/docs/features/api) | ||
- [Voyager Admin](https://wave.devdojo.com/docs/features/admin) | ||
- [Customizable Themes](https://wave.devdojo.com/docs/features/themes) | ||
`php artisan migrate:generate --tables="my_table"` | ||
|
||
|
||
## Demo | ||
View a live [demo here](https://wave.devdojo.com), or deploy your own instance to DigitalOcean, by clicking the button below. | ||
## Seeding | ||
- Generate seeders | ||
|
||
<a href="https://cloud.digitalocean.com/apps/new?repo=https://github.com/thedevdojo/wave/tree/main" target="_blank"><img src="https://www.deploytodo.com/do-btn-blue.svg" width="240" alt="Deploy to DO"></a> | ||
`php artisan iseed my_table` | ||
|
||
- Run seeders | ||
|
||
## Installation | ||
|
||
To install Wave, you'll want to clone or download this repo: | ||
|
||
``` | ||
git clone https://github.com/thedevdojo/wave.git project_name | ||
``` | ||
|
||
Next, we can install Wave with these **4 simple steps**: | ||
|
||
### 1. Create a New Database | ||
|
||
During the installation we need to use a MySQL database. You will need to create a new database and save the credentials for the next step. | ||
|
||
### 2. Copy the `.env.example` file | ||
|
||
We need to specify our Environment variables for our application. You will see a file named `.env.example`, you will need to duplicate that file and rename it to `.env`. | ||
|
||
Then, open up the `.env` file and update your *DB_DATABASE*, *DB_USERNAME*, and *DB_PASSWORD* in the appropriate fields. You will also want to update the *APP_URL* to the URL of your application. | ||
|
||
```bash | ||
APP_URL=http://wave.test | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=wave | ||
DB_USERNAME=root | ||
DB_PASSWORD= | ||
``` | ||
|
||
|
||
### 3. Add Composer Dependencies | ||
|
||
Next, we will need to install all our composer dependencies by running the following command: | ||
|
||
```php | ||
composer install | ||
``` | ||
### 4. Run Migrations and Seeds | ||
|
||
We need to migrate our database structure into our database, which we can do by running: | ||
|
||
```php | ||
php artisan migrate | ||
``` | ||
<br> | ||
Finally, we will need to seed our database with the following command: | ||
|
||
```php | ||
php artisan db:seed | ||
``` | ||
<br> | ||
|
||
🎉 And that's it! You will now be able to visit your URL and see your Wave application up and running. | ||
|
||
|
||
## Watch, Learn, and Build | ||
|
||
We've also got a full video series on how you can setup, build, and configure Wave. 🍿 You can watch first few videos for free, and additional videos will require a [DevDojo Pro](https://devdojo.com/pro) subscription. By subscribing to a [DevDojo Pro](https://devdojo.com/pro) subscription you will also be supporting the ongoing development of this project. It's a win win! 🙌 | ||
|
||
[Click here to watch the Wave Video Series](https://devdojo.com/course/wave). | ||
|
||
|
||
## Documentation | ||
|
||
Checkout the [official documentation here](https://wave.devdojo.com/docs). | ||
`php artisan db:seed` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace App; | ||
|
||
use Illuminate\Database\Eloquent\Factories\HasFactory; | ||
use Illuminate\Database\Eloquent\Model; | ||
|
||
class Event extends Model | ||
{ | ||
use HasFactory; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
database/migrations/2021_11_03_113304_create_announcement_user_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateAnnouncementUserTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('announcement_user', function (Blueprint $table) { | ||
$table->unsignedInteger('announcement_id')->index(); | ||
$table->unsignedBigInteger('user_id')->index(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('announcement_user'); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
database/migrations/2021_11_03_113304_create_announcements_table.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
use Illuminate\Database\Migrations\Migration; | ||
use Illuminate\Database\Schema\Blueprint; | ||
use Illuminate\Support\Facades\Schema; | ||
|
||
class CreateAnnouncementsTable extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function up() | ||
{ | ||
Schema::create('announcements', function (Blueprint $table) { | ||
$table->increments('id'); | ||
$table->string('title')->default(''); | ||
$table->string('description'); | ||
$table->text('body'); | ||
$table->timestamps(); | ||
}); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
* | ||
* @return void | ||
*/ | ||
public function down() | ||
{ | ||
Schema::dropIfExists('announcements'); | ||
} | ||
} |
Oops, something went wrong.