This repository has been archived by the owner on May 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
132 additions
and
1 deletion.
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,2 +1,37 @@ | ||
# EloquentPlus | ||
Laravel elequent for javascript/nodejs :) | ||
|
||
## help | ||
|
||
``` | ||
node artisan help | ||
node artisan list | ||
node artisan --help | ||
node artisan --h | ||
``` | ||
|
||
## Create a model | ||
|
||
|
||
``` | ||
node artisan make:model | ||
``` | ||
|
||
## Create a migration | ||
|
||
``` | ||
node artisan make:migrate | ||
``` | ||
|
||
|
||
## Create a controller | ||
|
||
``` | ||
node artisan make:controller | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
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,8 @@ | ||
|
||
// 4xmen under GPL-3 License | ||
// import modules | ||
|
||
class Comment extends Controller { | ||
|
||
} | ||
|
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,8 @@ | ||
|
||
// 4xmen under GPL-3 License | ||
// import modules | ||
|
||
class back extends Model { | ||
|
||
} | ||
|
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
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,33 @@ | ||
var fs = require("fs"); | ||
var plur = require('pluralize') | ||
exports.make = (name) => { | ||
var path = './database/migrations/' + name + '.js'; | ||
if (fs.existsSync(path)) { | ||
console.log('Error: Unable to create migration') | ||
console.log(`The migration "${name}" is exists : (`); | ||
return; | ||
} | ||
var pl = plur.plural(name); | ||
fs.writeFile(path, ` | ||
// 4xmen under GPL-3 License | ||
// import modules | ||
class Create${pl}Table extends Migration { | ||
up (){ | ||
Schema.create = function(table){ | ||
table.bigIncrements('id'); | ||
table.timestamps(); | ||
} | ||
} | ||
down(){ | ||
Schema.drop('${pl}'); | ||
} | ||
} | ||
`, (e) => { | ||
if (e == null) | ||
console.log(`${name} migration class created successfully : ) `); | ||
}); | ||
|
||
}; |
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,14 @@ | ||
|
||
// 4xmen under GPL-3 License | ||
// import modules | ||
|
||
class CreatePeopleTable extends Migration { | ||
up (){ | ||
|
||
} | ||
|
||
down(){ | ||
Schema::drop('flights'); | ||
} | ||
} | ||
|
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,18 @@ | ||
|
||
// 4xmen under GPL-3 License | ||
// import modules | ||
|
||
class CreatebacksTable extends Migration { | ||
|
||
up (){ | ||
Schema.create = function(table){ | ||
table.bigIncrements('id'); | ||
table.timestamps(); | ||
} | ||
} | ||
|
||
down(){ | ||
Schema.drop('backs'); | ||
} | ||
} | ||
|
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