Giter Site home page Giter Site logo

laravel's Introduction

Overview about Laravel Application

Requirements:

  • Sessions
  • P.O.O. : Classes, Héritages, Interfacing, Traits, Polymorphisme, Encapuslation, Facade pattern, DIC, Design patterns
  • PHP >= 5.5.9
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension

About Laravel 5

  • Use composer...
  • Bdd avec Migrations
  • Structure of Laravel app, assets, bootstrapp
  • Elixir avec Gulp : utilisation de SASS, Theme Boostrapp Twitter, PHPspec http://laravel.com/docs/5.0/elixir
  • Use Bower + GULP pour les librairies
  • Routing : Bonne pratique acec securisation
  • Use laravel debug bar : https://github.com/barryvdh/laravel-debugbar
  • Use librarie http://momentjs.com/
  • Use librarire animate.css https://github.com/daneden/animate.css
  • Use Jquery File Upload
  • Use ORM Eloquant
  • Laravel Envoy
  • Faire 404 depuis routing
  • Routes nommés avec regex
  • Configuration environement + database + MAintennance
  • Input getters poster avec Request: http://laravel.com/docs/5.1/requests
  • Upload avec if ($request->file('photo')->isValid()){} et $request->file('photo')->move($destinationPath);
  • Controllers Movies, Categories, Actors, + Implicit cOntrollers: getShow(), getIndex()...isMethod('POST'),$request->all(),
  • Redirecyion avec redirect() + Redirecton avec flashdatas: $request->session()->flash('status', 'Task was successful!'); return redirect('dashboard')->with('status', 'Profile updated!'); @if (session('status'))
    {{ session('status') }}

@endif

  • Réponses avec API ou pas... JSON Response
  • Service Provider: Créer un Mongo Connection av RoboitO,go et présentation de Mongo
  • Statics pages avec mentions, concept, contact...
  • Methode flash : $request->flashOnly('username', 'email');
  • Vues blade avec Themes et assets , tranmission de valeurs, Layout, if(), @for, @foreach loops() http://laravel.com/docs/5.1/blade
  • Services AUthentification avec AuthController: getLogin / postLogin + routing + request->user()
  • Services Command avec ARtisan Console pour envoyer une newsletter, extraire les prochain films qui sortiront cette anne dans u fichier
  • Collections pour afficher proprement le détail des films: Available Methods, sommes du budgets etc...
  • Encryption Service
  • Log le nb de personnes qui arrive sur la page du film du jour
  • Hashing Bcrypt Service Provider
  • Mail façade to send email
  • Pagination results
  • Query Builder avec pleins de requetes :)
  • Session avec des films à voir ou pas...
  • Validation de formulaire avec Validator::make() http://laravel.com/docs/5.0/validation
  • 1/ Entities & Migrations
  • 2/ write migration with Eloquents
  • 3/ write restufful controllers
  • 4/ boostrap & boostra form
  • Create helpers

Structure

  • The app directory, as you might expect, contains the core code of your application. We'll explore this folder in more detail soon.

  • The bootstrap folder contains a few files that bootstrap the framework and configure autoloading, as well as a cache folder that contains a few framework generated files for bootstrap performance optimization.

  • The config directory, as the name implies, contains all of your application's configuration files.

  • The database folder contains your database migration and seeds. If you wish, you may also use this folder to hold an SQLite database.

  • The public directory contains the front controller and your assets (images, JavaScript, CSS, etc.).

  • The resources directory contains your views, raw assets (LESS, SASS, CoffeeScript), and localization files.

  • The storage directory contains compiled Blade templates, file based sessions, file caches, and other files generated by the framework. This folder is segregated into app, framework, and logs directories. The app directory may be used to store any files utilized by your application. The framework directory is used to store framework generated files and caches. Finally, the logs directory contains your application's log files.

  • The tests directory contains your automated tests. An example PHPUnit is provided out of the box.

  • The vendor directory contains your Composer dependencies.

Namespace

As discussed above, the default application namespace is App; however, you may change this namespace to match the name of your application, which is easily done via the app:name Artisan command. For example, if your application is named "Ci", nemayou would run the following command:

  • php artisan app:name SocialNet

App directory

  • The app directory ships with a variety of additional directories such as Console, Http, and Providers.:

  • Think of the Console and Http directories as providing an API into the "core" of your application.

  • The HTTP protocol and CLI are both mechanisms to interact with your application, but do not actually contain application logic. In other words, they are simply two ways of issuing commands to your application.

  • The Console directory contains all of your Artisan commands, while the Http directory contains your controllers, filters, and requests.

  • The Jobs directory, of course, houses the queueable jobs for your application. Jobs may be queued by your application, as well as be run synchronously within the current request lifecycle.

  • The Events directory, as you might expect, houses event classes. Events may be used to alert other parts of your application that a given action has occurred, providing a great deal of flexibility and decoupling.

  • The Listeners directory contains the handler classes for your events. Handlers receive an event and perform logic in response to the event being fired. For example, a UserRegistered event might be handled by a SendWelcomeEmail listener.

  • The Exceptions directory contains your application's exception handler and is also a good place to stick any exceptions thrown by your application.

Installation

Via Laravel Installer

  • composer global require "laravel/installer=~1.1" Make sure to place the ~/.composer/vendor/bin directory in your PATH so the laravel executable can be located by your system. And next: laravel new blog

Or via Composer:

  • composer create-project laravel/laravel --prefer-dist

Directory Permissions Directories within the /storage and the /bootstrap/cache directories should be writable by your web server. If you are using the Homestead virtual machine, these permissions should already be set.

The next thing you should do after installing Laravel is set your application key to a random string. If you installed Laravel via Composer or the Laravel installer, this key has already been set for you by the key:generate command. Typically, this string should be 32 characters long

  • php artisan key:generate If the application key is not set, your user sessions and other encrypted data will not be secure!

Environment Configuration

https://github.com/vlucas/phpdotenv => DotEnv PHP library All of the variables listed in this file will be loaded into the $_ENV PHP super-global when your application receives a request.

  • Accessing: $environment = App::environment();

  • You may also pass arguments to the environment method to check if the environment matches a given value. You may even pass multiple values if necessary:

if (App::environment('local')) { // The environment is local }

if (App::environment('local', 'staging')) { // The environment is either local OR staging... }

General Config

  • Debug à true
  • Url a modifier
  • Timezone
  • Language && Fallback
  • Providers; Services third
  • Aliases

Debogage

  • Require this package with composer: composer require barryvdh/laravel-debugbar

Then, Barryvdh\Debugbar\ServiceProvider::class, 'Debugbar' => Barryvdh\Debugbar\Facade::class,

About Laravel PHP Framework

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as authentication, routing, sessions, queueing, and caching.

Laravel is accessible, yet powerful, providing powerful tools needed for large, robust applications. A superb inversion of control container, expressive migration system, and tightly integrated unit testing support give you the tools you need to build any application with which you are tasked.

Official Documentation

Documentation for the framework can be found on the Laravel website.

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license

laravel's People

Contributors

horuscmf 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.