cisetup
Stable
É uma estrutura codeigniter 3 que foi modificada e adicionou novos recursos como dotenv, sweet alert 2 e bootstrap 4, etc.
Use o compositor para instalar cisetup .
composer create-project kubi/ cisetup
Atualizar dependência.
composer install
defina seu arquivo dotenv em .env
APP_URL = http://localhost/Kubi_codes/cisetup/
APP_TIMEZONE = Asia/Jakarta
DB_HOST = localhost
DB_USERNAME = root
DB_PASSWORD =
DB_DATABASE =
DB_DRIVER = mysqli
<?php echos ( $ foobar ); ?>
<img src=" <?= asset_url() . 'img/foobar.png' ?> ">
APP_TIMEZONE = Asia/Jakarta
getenv('APP_TIMEZONE');
adicione este código acima do html <head>
<?php table_url (); ?>
depois disso crie uma tabela usando funções de tabela
table ( $ table_title , $ table_key , $ table_data )
exemplo: No controlador
$ data [ ' table_title ' ] = ' data_table ' ;
$ data [ ' table_key ' ] = [ ' ID ' , ' Category Name ' , ' Product Name ' , ' Cashier Name ' ];
$ data [ ' table_data ' ] = $ this -> db -> get ( ' product ' )-> result_array ();
Em visualizações
< ?php
table($table_title, $table_key, $table_data);
? >
notif ( ' type ' , ' title ' , ' message ' , ' url ' );
exemplo
notif ( ' success ' , ' Login Success ' , ' Welcome to app ' , ' home/user ' );
Solicitação HTTP GET
request_get ( $ url );
POST de solicitação HTTP
request_post ( $ url , $ query );
Solicitação HTTP PUT
request_put ( $ url , $ query );
Solicitação HTTP EXCLUIR
request_delete ( $ url );
exemplo
no seu controlador
public function index ()
{
// Use notif
notif ( ' success ' , ' Welcome to kubicode ' , ' This is the message from Home/index ' );
// Data for send to view
$ data [ ' title ' ] = ' Home | Kubi Code ' ;
$ data [ ' response ' ] = request_get ( ' https://jsonplaceholder.typicode.com/todos ' );
// Load view
$ this -> load -> view ( ' layouts/header ' , $ data );
$ this -> load -> view ( ' home/index ' );
$ this -> load -> view ( ' layouts/footer ' );
}
Solicitações pull são bem-vindas. Para mudanças importantes, abra primeiro uma edição para discutir o que você gostaria de mudar.
Certifique-se de atualizar os testes conforme apropriado.
MIT