GithubHelp home page GithubHelp logo

okka / firstlaravel Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 1.15 MB

simple project of laravel, Website example of the products offered for sale, admin can Add delete or modify product data

PHP 88.62% JavaScript 1.20% Shell 0.52% Blade 9.65%

firstlaravel's Introduction

سأضع هنا الخطوات التي قمت بها لانجاز هذا المشروع

أولا قمت بتنصيبالكومبوزر ثم ننشئء مشروع ونسميه مثلا firstlaravel

>laravel new firstlaravel

،يقوم الكومبوزر بتحميل الملفات اللازمة للتأكد من التنصيب بشكل صحيح قم بالامر

>php artisan serve

:ثم افتح المتصفح واكتب العنوان http://localhost:8000/

أول مانقوم به قبل بداية المشروع هو انشاء ملف المتحكم نسميه مثلا prodcon

>php artisan make:controller prodcon

ثم نربط المشروع مع قاعدة البيانات، نعدل ملف .env

...
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=dbname
DB_USERNAME=dbuser
DB_PASSWORD=dbpassword
...

ثم ننشئ الجدول الخاص بالمشروع مثلا نسميه produits(لاحظ جيدا ان الجدول بصيغة الجميع، مهم جدا بالنسبة لمستعملي elequant model )

>php artisan make:migration create_table_produits --create="produits"

نبحث عن الملف في المسار database\migrations\ ونقوم باضافة الاعمدة اللازمة ثم نحفض التغيير بالامر

>php artisan migrate

وبعدها ننشئ اختصار للجدول produits لاستعماله في الكود بطريقة سهلة (احرص على كتابة نفس اسم الجدول في القاعدة بصيغة الفرد)

>php artisan make:model Produit

firstlaravel's People

Contributors

okka avatar

Stargazers

Salah Eddine Taouririt avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.