added event image and db

Cette révision appartient à :
Ibrahim Khail Shakil 2024-01-03 14:22:53 +06:00
Parent d0606ca43f
révision aa7aed5a3b
26 fichiers modifiés avec 23 ajouts et 51 suppressions

Voir le fichier

@ -14,54 +14,21 @@ class EventController extends Controller
public function index()
{
$event = Event::get();
$data = array();
if ($event) {
foreach ($event as $e) {
$data[] = array(
'id' => $e->id,
'title' => $e->title,
'description' => $e->description,
'image' => asset('public/uploads/event/' . $e->image),
'location' => $e->location,
'hosted_by' => $e->hosted_by,
'date' => date("d", strtotime($e->date)),
);
}
}
return response($event, 200);
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(Event $event)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(Event $event)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, Event $event)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(Event $event)
{
//
}
}

Voir le fichier

@ -16,7 +16,10 @@ public function up(): void
$table->string('title');
$table->text('description');
$table->string('location');
$table->string('image')->nullable();
$table->string('location');
$table->string('hosted_by');
$table->date('date')->nullable();
$table->timestamps(); // Created at and Updated at columns
$table->softDeletes(); // Deleted at column for soft deletes

Voir le fichier

@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 03, 2024 at 08:55 AM
-- Generation Time: Jan 03, 2024 at 09:21 AM
-- Server version: 10.4.27-MariaDB
-- PHP Version: 8.2.0
@ -221,8 +221,10 @@ CREATE TABLE `events` (
`id` bigint(20) UNSIGNED NOT NULL,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
`image` varchar(255) DEFAULT NULL,
`location` varchar(255) NOT NULL,
`hosted_by` varchar(255) NOT NULL,
`date` datetime DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL
@ -232,9 +234,9 @@ CREATE TABLE `events` (
-- Dumping data for table `events`
--
INSERT INTO `events` (`id`, `title`, `description`, `location`, `hosted_by`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Event 1', 'Description for Event 1.', 'Location 1', 'Host 1', '2024-01-03 07:39:47', '2024-01-03 07:39:47', NULL),
(2, 'Event 2', 'Description for Event 2.', 'Location 2', 'Host 2', '2024-01-03 07:39:47', '2024-01-03 07:39:47', NULL);
INSERT INTO `events` (`id`, `title`, `description`, `image`, `location`, `hosted_by`, `date`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Event 1', 'Description for Event 1.', '1.jpg', 'Location 1', 'Host 1', NULL, '2024-01-03 07:39:47', '2024-01-03 07:39:47', NULL),
(2, 'Event 2', 'Description for Event 2.', '02.jpg', 'Location 2', 'Host 2', NULL, '2024-01-03 07:39:47', '2024-01-03 07:39:47', NULL);
-- --------------------------------------------------------

BIN
public/uploads/event/02.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 69 KiB

BIN
public/uploads/event/03.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 79 KiB

BIN
public/uploads/event/1.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 69 KiB

BIN
public/uploads/event/10.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 83 KiB

BIN
public/uploads/event/2.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 94 KiB

BIN
public/uploads/event/3.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 100 KiB

BIN
public/uploads/event/4.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 81 KiB

BIN
public/uploads/event/5.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 138 KiB

BIN
public/uploads/event/6.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 87 KiB

BIN
public/uploads/event/7.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 40 KiB

BIN
public/uploads/event/8.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 108 KiB

BIN
public/uploads/event/9.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 101 KiB

BIN
public/uploads/event/dots.png Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 390 B

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 83 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 71 KiB

BIN
public/uploads/event/info.jpg Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 234 KiB

BIN
public/uploads/event/round.png Fichier normal

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 2.0 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 56 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 52 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 41 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 44 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 55 KiB

Fichier binaire non affiché.

Après

Largeur:  |  Hauteur:  |  Taille: 37 KiB