{"id":23095113,"url":"https://github.com/chihebnabil/chihebphp","last_synced_at":"2025-08-16T10:33:23.655Z","repository":{"id":80694092,"uuid":"43221457","full_name":"chihebnabil/ChihebPHP","owner":"chihebnabil","description":"This php MVC Framework uses as a dependency Cakephp ORM to manage database .","archived":false,"fork":false,"pushed_at":"2024-02-29T20:36:59.000Z","size":98,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-02-29T21:54:01.532Z","etag":null,"topics":["cakephp-orm","php","php-mvc-framework"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chihebnabil.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-09-26T20:18:36.000Z","updated_at":"2018-10-12T12:15:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"e078a442-1f69-4078-8555-e98ecbe53800","html_url":"https://github.com/chihebnabil/ChihebPHP","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebnabil%2FChihebPHP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebnabil%2FChihebPHP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebnabil%2FChihebPHP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chihebnabil%2FChihebPHP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chihebnabil","download_url":"https://codeload.github.com/chihebnabil/ChihebPHP/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230032806,"owners_count":18162509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cakephp-orm","php","php-mvc-framework"],"created_at":"2024-12-16T22:19:31.899Z","updated_at":"2024-12-16T22:19:32.716Z","avatar_url":"https://github.com/chihebnabil.png","language":"PHP","readme":"PHP MVC FRAMEWORK\n===\n\n[![Join the chat at https://gitter.im/chihebnabil/Chiheb-PHP](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/chihebnabil/Chiheb-PHP?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nThis php MVC Framework uses as a dependency  Cakephp ORM to manage database .\n\n\nINSTALATION\n====\n\nDOWNLOAD\n==\nDownload the github repo  Unzip it then make a composer install to install dependencies\n\nChange the rewritebase in  public/.htaccess\n\nDATABASE\n==\n\nTo setup your database go to  /app/database.php and change the (username,password,database)\n\n```php\n\nuse Cake\\Datasource\\ConnectionManager;\nuse Cake\\ORM\\TableRegistry;\nConnectionManager::config('default', [\n    'className' =\u003e 'Cake\\Database\\Connection',\n    'driver' =\u003e 'Cake\\Database\\Driver\\Mysql',\n    'database' =\u003e DATABASE,\n    'username' =\u003e DB_USERNAME,\n    'password' =\u003e DB_PASSWORD,\n    'host'     =\u003e HOSTNAME\n]);\n\n\n\n```\nControllers\n==\nExample of users controller [user's Auth] :\n\n```php\n\nuse Cake\\ORM\\TableRegistry;\n\n\n\n\nclass Users extends Controller\n{\npublic function login()\n   {\n     $Auth = new Auth();\n     $Auth-\u003elogin('username','password');\n     $this-\u003eview('users/login');  // load view file in app/views/users/login.php\n\n   }\n\n}\n\n\n```\nViews\n==\nViews are in app/views/YOURCONTROLLER/ folder\n\nyou can call the views function ex:\n\n```php\n\n $this-\u003eview('users/login');  // load view file in\n app/views/users/login.php\n\n\n\n```\nLayouts\n==\nLayouts are in app/views/layouts/ folder\n\nby default the layout is default.php\n\nif you want to change the default layout in the view function :\n\n\n```php\n\n$this-\u003eview('users/login',$data,'mylayout.php');\n\n // load view file with layout file mylayout.php\n\n\n```\n\nHTML HELPERS\n==\nExample of script \u0026 css tags\n\n```php\n\n\n    echo Html::script($src);\n\n    echo Html::css($link);\n\n    echo Html::image($src, $attributes = '');\n\n    echo Html::email($email, $label = null, $attributes = null);\n\n\n```\n\nHTTP HELPERS\n==\nExample of enabling cors function  :\n\n```php\n\nHttp::cors();\n\n\n```\n\n####MAIL\nExample of creating an e-mail using Nette\\Mail\\Message class:\n\n```php\n use Nette\\Mail\\Message;\n\n    $mail = new Message;\n\n    $mail-\u003esetFrom('John \u003cjohn@example.com\u003e')\n    -\u003eaddTo('peter@example.com')\n    -\u003eaddTo('jack@example.com')\n    -\u003esetSubject('Order Confirmation')\n    -\u003esetBody(\"Hello, Your order has been accepted.\");\n```\n\n\n\n\n####UPLOAD\n\nExample of UPLOADING  a file\n\n\n```php\n    if (!empty($_FILES['file'])) {\n\n      $handle = new upload($_FILES['file']);\n      if ($handle-\u003euploaded) {\n        $file_name = md5(rand(1000, 9999999)) ;\n       $ext =   explode(\".\", strtolower($_FILES['file']['name']));\n        $handle-\u003efile_new_name_body   = $file_name ;\n\n\n        $handle-\u003eimage_ratio_y        = true;\n        $handle-\u003eprocess(APP.'files');\n        if ($handle-\u003eprocessed) {\n\n\n\n\n          $handle-\u003eclean();\n        } else {\n          echo 'error : ' . $handle-\u003eerror;\n        }\n      }\n\n}\n```\nDOCUMENTATION\n==\n\n### License\n\nThis framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchihebnabil%2Fchihebphp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchihebnabil%2Fchihebphp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchihebnabil%2Fchihebphp/lists"}