forked from jefyokta/kamela2
-
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.
- Loading branch information
Showing
10 changed files
with
94 additions
and
35 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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
APP_NAME=Kamelapermai | ||
APP_HOST=kamela-permai.oktaa | ||
APP_PORT=8000 | ||
APP_KEY= | ||
|
||
DB_HOST=127.0.0.1 | ||
DB_NAME=Kamela | ||
DB_USER=root | ||
DB_PASSWORD= |
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 +1,12 @@ | ||
# kamela2 | ||
|
||
### Requirement | ||
- wsl or docker (if you using windows) | ||
- php 8.1+ | ||
- php-ext openswoole | ||
|
||
### Built with: | ||
Frontend: blade,tailwindcss,flowbite | ||
Backend: Php, jefyokta/oktaax | ||
Database: Mysql | ||
|
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
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,10 +1,16 @@ | ||
<?php | ||
namespace Kamela\Models; | ||
|
||
namespace Kamela\Models; | ||
use oktaa\Database\Database; | ||
|
||
class Gallery extends Database | ||
{ | ||
protected string $table = 'gallery'; | ||
|
||
} | ||
protected array $definition = [ | ||
"id" => "INT AUTO_INCREMENT PRIMARY KEY", | ||
"typeid" => "VARCHAR(255) NOT NULL", | ||
"img" => "VARCHAR(255) NOT NULL", | ||
"name" => "VARCHAR(255) NOT NULL", | ||
]; | ||
} |
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
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 |
---|---|---|
@@ -1,8 +1,31 @@ | ||
#!/usr/bin/env php | ||
|
||
<?php | ||
|
||
use Oktaax\Console; | ||
use Swoole\Coroutine; | ||
use Swoole\ExitException; | ||
|
||
require_once __DIR__ . "/app/Command/Command.php"; | ||
|
||
require_once __DIR__ . "/vendor/autoload.php"; | ||
|
||
$argument = $argv; | ||
|
||
|
||
$command = new Command(); | ||
$command->handle($argument); | ||
if (count($argument) > 1) { | ||
|
||
Coroutine::run(function () use ($argument) { | ||
$command = new Command(); | ||
try { | ||
$command->handle($argument); | ||
} catch (ExitException $e) { | ||
Console::info("Swoole Exit!"); | ||
} catch (\Throwable $th) { | ||
Console::error($th->getMessage()); | ||
} | ||
}); | ||
} else { | ||
echo "empty arguments!\n"; | ||
|
||
} |