APIS SAHEL
APIS SAHEL
Project Description:
This project aims to develop a website for APIS Sahel, providing information about their services, products, and contact details. The website will be designed to be user-friendly and visually appealing, ensuring a seamless browsing experience for visitors.
Add Blog details
I - SHOW A SINGLE BLOG
- create a route that accepts an ID
- controller method ( show)
- a blade file for the view
- Blog table
II - UPLOAD A BLOG
- create two routes: form (create) & store
- create the controller methods
- create the form ==> Route to blog upload form: /create
II - ADD AUTHENTICATION FEATURE
-
first install the UI package: composer require laravel/ui
-
create the auth scaffolding using the ui Artisan command: php artisan ui bootstrap --auth
-
make the migration
-
protect the private routes Route::group(['middleware'=>'auth'],function (){ //the routes go here... })
-
run the command: npm install npm run dev
III - ADD COMMENT SECTION UNDER EACH BLOG POST
- create a Comment model with:
- comment content
- user id
- blog post id
- create a migration file
- update the blog model to add relationship with comment
- create a controller method to store the comment
- update the BlogController
- update the blog view
- update routes
Commands to Run
1-user tatble: php artisan make:migration add_is_admin_to_users_table --table=users 2. php artisasn migrate
IV - Next steps
- Registration for new users : DONE ✅
- Redirect issues
- Display number of comments on the preview ✅
- Display several images per blog✅
- Mot du secretaire
- Handle comments from admin dashboard ✅
- Add author to blog article: migratation, $fillable, php artisan make:migration set_default_value_for_author_in_blogs_table --table=blogs ✅
- Manage multiple blog images from admin dashboard ✅
- create a new migration file: php artisan make:migration create_blog_images_table --create=blog_images
- create the structure of the image table in the migratio file
- create the table: php artisan migrate
- In the Blog model, define a relationship to the BlogImage
- In the BlogImage model, define a relationship to the Blog
- In the BlogController, create a new method to store the images
- Edit previous post to add more images
STEPS TO IMPLEMENT LANGUAGE SWITCHING Step 1: Create Middleware Step 2: Register Middleware Step 3: Create a Route to Change Language Step 4: Use Links to Change Language
SUCCESS STORY FEATURE
The feature will highlight the benefiairies speechs after receiving help from the NGO. There will be two types of contents:
- images and text;
- video only The videos will be displayed on the landing page at bottom after the blog section and the images associated with text will be in a separated page. A link to the page would be on the navigation menu
IMPLEMENTATION The feature will be implemented following these steps:
- Create a new migration file to create a new table
- Create the table
- Create a new model for the success story: title, description, image, video, more images,
- Create a new controller for the success story
- Create a new view for the success story
- Add a link to the success story page in the navigation menu
- Add a link to the success story page in the footer