Skip to content

Commit

Permalink
first push
Browse files Browse the repository at this point in the history
  • Loading branch information
Zakarialabib committed Dec 17, 2023
1 parent 899bcf3 commit d7336e0
Show file tree
Hide file tree
Showing 86 changed files with 46 additions and 163 deletions.
2 changes: 2 additions & 0 deletions app/Enums/PageType.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ enum PageType: string
case ABOUT = 'about';
case BLOG = 'blog';
case CONTACT = 'contact';
case SERVICE = 'service';

public function label(): string
{
Expand All @@ -18,6 +19,7 @@ public function label(): string
static::ABOUT => __('About'),
static::BLOG => __('blog'),
static::CONTACT => __('contact'),
static::SERVICE => __('service'),
};
}

Expand Down
7 changes: 5 additions & 2 deletions app/Livewire/Admin/Page/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class Edit extends Component

public $type;

public $language_id;

public $status;

#[On('editorjs-save')]
Expand All @@ -64,6 +66,7 @@ public function mount($id): void
$this->description = $this->page->description;
$this->meta_title = $this->page->meta_title;
$this->meta_description = $this->page->meta_description;
$this->language_id = $this->page->language_id;

// is string or is array
if (is_string($this->page->settings)) {
Expand All @@ -81,10 +84,10 @@ public function update(): void

$this->page->slug = Str::slug($this->page->name);

if ( ! $this->image) {
if (!$this->image) {
$this->image = null;
} elseif (is_object($this->image) && method_exists($this->image, 'extension')) {
$imageName = Str::slug($this->page->name).'.'.$this->image->extension();
$imageName = Str::slug($this->page->name) . '.' . $this->image->extension();
$this->image->storeAs('pages', $imageName, 'local_files');
$this->page->image = $imageName;
}
Expand Down
2 changes: 1 addition & 1 deletion app/Livewire/Admin/Section/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function editModal($id): void

$this->embeded_video = $this->section->embeded_video;
$this->image = $this->section->image;
$this->type = $this->section->type;
$this->type = $this->section->type->value;

$this->description = $this->section->description;

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "laravel/laravel",
"name": "zakarialabib/corporateweb",
"type": "project",
"description": "The Laravel Framework.",
"description": "Livewire Corporate CMS or Portfolio.",
"keywords": [
"framework",
"laravel"
Expand Down
Binary file removed corporateWeb.zip
Binary file not shown.
32 changes: 16 additions & 16 deletions database/seeders/SectionSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ public function run()
'id' => 1,
'title' => 'Welcome to',
'image' => uploadImage('images/sections', 640, 480),
'featured_title' => 'Polyafrique',
'subtitle' => 'Polyafrique',
'featured_title' => 'CorporateWeb',
'subtitle' => 'CorporateWeb',
'label' => 'Read Moe',
'link' => 'https://polyafrique.com/',
'description' => 'We provide polymer materials to the plastic industry, sourcing of raw materials in all over the world',
'link' => 'https://github.com/zakarialabib',
'description' => 'Salam, Thank you for having this project on we welcome you with a good heart',
'status' => '1',
'bg_color' => '#effaeb',
'text_color' => 'black',
Expand All @@ -40,11 +40,11 @@ public function run()
'id' => 2,
'title' => 'About us',
'image' => uploadImage('images/sections', 640, 480),
'featured_title' => 'Polyafrique',
'subtitle' => 'Polyafrique',
'label' => 'Polyafrique',
'link' => 'https://polyafrique.com/',
'description' => 'We are a polymer distribution and negociation company, created in 2020 in Casablanca, to facilitate the sourcing of raw materials in Africa and all over the continents of the globe, polyethylene or polypropylene, granules or powder, and all that is polymers necessary for the industry of your plastic articles. ',
'featured_title' => 'CorporateWeb',
'subtitle' => 'CorporateWeb',
'label' => 'CorporateWeb',
'link' => 'https://github.com/zakarialabib',
'description' => 'Making the world a better place',
'status' => '1',
'bg_color' => '#effaeb',
'text_color' => 'black',
Expand All @@ -56,10 +56,10 @@ public function run()
'id' => 3,
'title' => 'Contact',
'image' => uploadImage('images/sections', 640, 480),
'featured_title' => 'Polyafrique',
'subtitle' => 'Polyafrique',
'label' => 'Polyafrique',
'link' => 'https://polyafrique.com/',
'featured_title' => 'CorporateWeb',
'subtitle' => 'CorporateWeb',
'label' => 'CorporateWeb',
'link' => 'https://github.com/zakarialabib',
'description' => 'Get in touch with us',
'status' => '1',
'bg_color' => '#effaeb',
Expand All @@ -72,11 +72,11 @@ public function run()
'id' => 4,
'title' => 'Services',
'image' => uploadImage('images/sections', 640, 480),
'featured_title' => 'Polyafrique',
'featured_title' => 'CorporateWeb',
'subtitle' => 'We have a wide range of services.',
'label' => 'Read More',
'link' => 'https://polyafrique.com/',
'description' => ' Commercial and logistical solutions, to serve small and large companies, we can facilitate the delivery of your order from our many points of sale and storage over the globe.',
'link' => 'https://github.com/zakarialabib',
'description' => ' Dev solutions, to serve small and large companies, we can facilitate the delivery of your projects from our many points.',
'status' => '1',
'bg_color' => '#effaeb',
'text_color' => 'black',
Expand Down
129 changes: 4 additions & 125 deletions database/seeders/ServiceSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,132 +21,11 @@ public function run()

$services = [
[
'title' => 'HDPE',
'slug' => 'hdpe',
'title' => 'Service 1',
'slug' => 'service-1',
'type' => null,
'image' => 'hdpe.jpg',
'content' => 'High-density polyethylene (HDPE) is a type of plastic that is made from the monomer ethylene. It is a strong, durable, and lightweight material that is often used in the manufacture of plastic bags, bottles, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'LDPE',
'slug' => 'ldpe',
'type' => null,
'image' => 'ldpe.jpg',
'content' => 'Low-density polyethylene (LDPE) is a type of plastic that is made from the monomer ethylene. It is a soft, flexible, and lightweight material that is often used in the manufacture of plastic bags, films, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'LLDPE',
'slug' => 'lldpe',
'type' => null,
'image' => 'lldpe.jpg',
'content' => 'Linear low-density polyethylene (LLDPE) is a type of plastic that is made from the monomers ethylene and propylene. It is a strong, flexible, and lightweight material that is often used in the manufacture of plastic bags, films, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'MDPE',
'slug' => 'mdpe',
'type' => null,
'image' => 'mdpe.jpg',
'content' => 'Medium-density polyethylene (MDPE) is a type of plastic that is made from the monomer ethylene. It is a strong, durable, and lightweight material that is often used in the manufacture of plastic bags, bottles, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'PPR',
'slug' => 'ppr',
'type' => null,
'image' => 'ppr.jpg',
'content' => 'Polypropylene (PP) is a type of plastic that is made from the monomer propylene. It is a strong, durable, and lightweight material that is often used in the manufacture of plastic bags, bottles, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'PPC',
'slug' => 'ppc',
'type' => null,
'image' => 'ppc.jpg',
'content' => 'Polypropylene copolymers (PPC) are a type of plastic that is made from the monomers propylene and ethylene. They are a strong, durable, and lightweight material that is often used in the manufacture of plastic bags, bottles, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'PPH',
'slug' => 'pph',
'type' => null,
'image' => 'pph.jpg',
'content' => 'Polyphenylene oxide (PPO) is a type of plastic that is made from the monomers phenylene oxide and bisphenol A. It is a strong, durable, and lightweight material that is often used in the manufacture of plastic bags, bottles, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'EVA',
'slug' => 'eva',
'type' => null,
'image' => 'eva.jpg',
'content' => 'Ethylene-vinyl acetate (EVA) is a type of plastic that is made from the monomers ethylene and vinyl acetate. It is a soft, flexible, and lightweight material that is often used in the manufacture of plastic bags, films, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'EMA',
'slug' => 'ema',
'type' => null,
'image' => 'ema.jpg',
'content' => 'Ethylene-methyl acrylate (EMA) is a type of plastic that is made from the monomers ethylene and methyl acrylate. It is a soft, flexible, and lightweight material that is often used in the manufacture of plastic bags, films, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'EBA',
'slug' => 'eba',
'type' => null,
'image' => 'eba.jpg',
'content' => 'Ethylene-butyl acrylate (EBA) is a type of plastic that is made from the monomers ethylene and butyl acrylate. It is a soft, flexible, and lightweight material that is often used in the manufacture of plastic bags, films, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'EEA',
'slug' => 'eea',
'type' => null,
'image' => 'eea.jpg',
'content' => 'Ethylene-ethyl acrylate (EEA) is a type of plastic that is made from the monomers ethylene and ethyl acrylate. It is a soft, flexible, and lightweight material that is often used in the manufacture of plastic bags, films, and toys.',
'status' => 1,
'features' => null,
'options' => null,
'language_id' => $language->id,
],
[
'title' => 'EPEM',
'slug' => 'epem',
'type' => null,
'image' => 'epem.jpg',
'content' => 'Ethylene-propylene-ethylidene norbornene (EPEM) is a type of plastic that is made from the monomers ethylene, propylene, and ethylidene norbornene. It is a strong, durable, and lightweight material that is often used in the manufacture of plastic bags, bottles, and toys.',
'image' => 'service.jpg',
'content' => 'High quality service , made from the some out of space. It is a strong, durable, and lightweight.',
'status' => 1,
'features' => null,
'options' => null,
Expand Down
22 changes: 11 additions & 11 deletions database/seeders/SettingSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ class SettingSeeder extends Seeder
protected $settings = [
[
'key' => 'company_name',
'value' => 'Polyafrique',
'value' => 'CorporateWeb',
],
[
'key' => 'site_title',
'value' => 'Polyafrique',
'value' => 'CorporateWeb',
],
[
'key' => 'company_email_address',
'value' => 'C.laghmouchi@polyafrique.com',
'value' => 'zakarialabib@gmail.com',
],
[
'key' => 'company_phone',
'value' => '+212661716483',
'value' => '+212638041919',
],
[
'key' => 'company_address',
Expand Down Expand Up @@ -53,19 +53,19 @@ class SettingSeeder extends Seeder
],
[
'key' => 'seo_meta_title',
'value' => 'Polyafrique',
'value' => 'CorporateWeb',
],
[
'key' => 'seo_meta_description',
'value' => 'Polyafrique',
'value' => 'CorporateWeb',
],
[
'key' => 'social_facebook',
'value' => '#',
'value' => 'https://www.facebook.com/zakaria.labiib/',
],
[
'key' => 'social_twitter',
'value' => '#',
'value' => 'https://twitter.com/zakarialabib',
],
[
'key' => 'social_tiktok',
Expand All @@ -77,7 +77,7 @@ class SettingSeeder extends Seeder
],
[
'key' => 'social_linkedin',
'value' => '#',
'value' => 'https://www.linkedin.com/in/zakaria-labib/',
],
[
'key' => 'social_whatsapp',
Expand Down Expand Up @@ -119,12 +119,12 @@ public function run()
foreach ($this->settings as $index => $setting) {
$result = Settings::create($setting);

if ( ! $result) {
if (!$result) {
$this->command->info("Insert failed at record $index.");

return;
}
}
$this->command->info('Inserted '.count($this->settings).' records');
$this->command->info('Inserted ' . count($this->settings) . ' records');
}
}
6 changes: 3 additions & 3 deletions database/seeders/SliderSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function run()
'image' => uploadImage('images/sliders', 1640, 1480),
'bg_color' => 'bg-white',
'featured' => 1,
'link' => 'https://www.polyafrique.com',
'link' => 'https://www.github.com/zakarialabib',
'language_id' => $language->id,
],
[
Expand All @@ -37,7 +37,7 @@ public function run()
'image' => uploadImage('images/sliders', 1640, 1480),
'bg_color' => 'bg-white',
'featured' => 0,
'link' => 'https://www.polyafrique.com',
'link' => 'https://www.github.com/zakarialabib',
'language_id' => $language->id,
],
[
Expand All @@ -47,7 +47,7 @@ public function run()
'image' => uploadImage('images/sliders', 1640, 1480),
'bg_color' => 'bg-white',
'featured' => 0,
'link' => 'https://www.polyafrique.com',
'link' => 'https://www.github.com/zakarialabib',
'language_id' => $language->id,
],
]);
Expand Down
Binary file removed public/images/gallery/Gallery-1696848270.jpg
Binary file not shown.
Binary file removed public/images/gallery/Gallery-1696848304.jpg
Binary file not shown.
Binary file removed public/images/logo.png
Binary file not shown.
Loading

0 comments on commit d7336e0

Please sign in to comment.