0% found this document useful (0 votes)
8 views41 pages

sandip

The document outlines various PHP Laravel assignments created by Sandip Parmar, including forms for student registration, product management, job applications, library management, hotel bookings, event registration, employee registration, online course enrollment, and customer feedback. Each form includes specific fields, validation requirements, and displays submitted details in a table format. The document also includes GitHub links for code access.

Uploaded by

Sandip Parmar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views41 pages

sandip

The document outlines various PHP Laravel assignments created by Sandip Parmar, including forms for student registration, product management, job applications, library management, hotel bookings, event registration, employee registration, online course enrollment, and customer feedback. Each form includes specific fields, validation requirements, and displays submitted details in a table format. The document also includes GitHub links for code access.

Uploaded by

Sandip Parmar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 41

NAME : SANDIP PARMAR

ROLL NO :IT24A41
SUB : PHP LARAWEL ASSIGNMENT 1 SET 1-20
CODE GITHUB LINKhttps://github.com/sandipparmar2722/php-
assignment-

SET 1 - 10 BLADE CODE :

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>SET 1-10 </title>
</head>
<body>
<div>
{{-- Create StudentController.
• Create StudentRegistration form with fields: Full Name, Email, Phone
Number, Course.
• Validations: All fields are mandatory; Phone Number must be exactly
10 digits.
• Display submitted details in a table format. --}}

<h1> Set 1 : Student Registration Form</h1>


<form action="submitform1" method="POST">
@csrf
<label for="fullname"> ENTER FULL NAME : </label>
<input type="text" id="fullname" name="fullname" required>
<br>
<br>
<label > ENTER EMAIL : </label>
<input type="email" id="email" name="email" required
accept="number">
<br>
<br>
<label> ENTER PHONE NO : </label>
<input type="text" id="phone" name="phone" required
title="enter only 10 digit" pattern="[1-9]{1}[0-9]{9}">
<br>
<br>

<label> ENTER COURSE : </label>


<input type="text" id="course" name="course" required>
<br>
<br>

<button type="submit"> SUBMIT</button>


</form>
</div>
<DIV>

@if
(session('fullname')&&session('email')&&session('phone')&&session('cour
se'))
@endif
<table>
<tr>
<td>SR NO</td>
<td>FULL NAME</td>
<td>EMAIL</td>
<td>PHONE</td>
<td>COURSE</td>
</tr>
<tr>
<td>1</td>
<td>{{session('fullname')}}</td>
<td>{{session('email')}}</td>
<td>{{session('phone')}}</td>
<td>{{session('course')}}</td>
</tr>
</table>
<div>
{{--
: Product Management System
• Create ProductController.
• Create ProductEntry form with fields: Product Name, Category, Price,
Stock Quantity.
• Validations: All fields are required, Price should be a positive
number, Stock Quantity should be
at least 1.
• Display submitted details in a table format --}}
<h1> Set 2: Product Management System </h1>
<form action="submitform2" method="post">
@csrf

<label > PRODUCT NAME : </label>


<input type="text" id="productname" name="productname"
required>
<br>
<br>
<label> ENTER CATAGORY : </label>
<input type="text" id="category" name="category" required>
<br>
<br>

<label > ENTER PRICE : </label>


<input type="number" id="price" name="price" required
min="0.01" step="0.01" >
<br>
<br>
<label> ENTER FULL STOCK : </label>
<input type="number" id="stock" name="stock" required
title="enter atleast 1 stock quantity" required min="1">
<br>
<button type="submit"> SUBMIT </button>
</form>

</div>
@if
(session('productname')&&session('category')&&session('price')&&session
('stock'))
@endif
<table>
<tr>
<th>PRODUCT NAME</th>
<th>CATAGORY</th>
<th>PRICE</th>
<th>STOCK</th>
</tr>
<tr>
<td>{{session('productname')}}</td>
<th>{{session('category')}}</th>
<th>{{session('price')}}</th>
<th>{{session('stock')}}</th>
</tr>

</table>

</DIV>
<div>
{{-- Set 3: Job Application Form
• Create JobApplicationController.
• Create JobApplication form with fields: Full Name, Email, Phone
Number, Position.
• Validations: All fields are mandatory.
• Display submitted details in a table format --}}
<h1> Set 3: Job Application Form </h1>
<form action="submitform3" method="post">
@csrf

<label > Full Name : </label>


<input type="text" id="fullname" name="fullname" required>
<br>
<br>
<label> Email : </label>
<input type="email" id="email" name="email" required>
<br>
<br>

<label > Phone Number : </label>


<input type="number" id="phone" name="phone" required pattern="[0-
9]{10,15}" title="Enter a valid phone number (10-15 digits)" >
<br>
<br>
<label> Position </label>
<input type="text" id="Position" name="Position" >
<br>
<button type="submit"> SUBMIT </button>
</form>

</div>

@if
(session('fullname')&&session('email')&&session('phone')&&session('Posi
tion'))
@endif
<table>
<tr>
<th>FULL NAME</th>
<th>EMAIL</th>
<th>PHONE NO </th>
<th>POSITION</th>
</tr>
<tr>
<td>{{session('fullname')}}</td>
<td>{{session('email')}}</td>
<td>{{session('phone')}}</td>
<td>{{session('Position')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- Set 4: Library Management System
• Create LibraryController.
• Create BookEntry form with fields: Book Title, Author, ISBN,
Publication Year.
• Validations: All fields are required, ISBN must be exactly 13
characters.
• Display submitted details in a table format --}}
<h1> Set 4: Library Management System </h1>
<form action="submitform4" method="post">
@csrf

<label > Book Title : </label>


<input type="text" id="title" name="title" required>
<br>
<br>
<label> Author : </label>
<input type="text" id="author" name="author" required>
<br>
<br>

<label > ISBN: </label>


<input type="number" id="isbn" name="isbn" required pattern="[0-
9]{13}" maxlength="13" minlength="13" title="Enter exactly 13 digits">
<br>
<br>
<label> Publication Year: </label>
<input type="year" id="year" name="year" >
<br>
<button type="submit"> SUBMIT </button>
</form>

</div>

@if
(session('title')&&session('author')&&session('isbn')&&session('year'))
@endif
<table>
<tr>
<th>TITLE</th>
<th>AUTHER</th>
<th>ISBN</th>
<th>YEAR</th>
</tr>
<tr>
<td>{{session('title')}}</td>
<td>{{session('author')}}</td>
<td>{{session('isbn')}}</td>
<td>{{session('year')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- Set 5: Hotel Booking System
• Create BookingController.
• Create HotelBookingForm with fields: Customer Name, Email, Check-
in Date, Check-out Date.
• Validations: All fields are required, Check-out Date must be
later than Check-in Date.
• Display submitted details in a table format --}}
<h1> Set 5: Hotel Booking System </h1>

<form action="submitform5" method="post">


@csrf

<label > Customer Name : </label>


<input type="text" id="name" name="name" required>
<br>
<br>
<label> Email : </label>
<input type="text" id="email" name="email" required>
<br>
<br>

<label > Check-in Date: </label>


<input type="date" id="indate" name="indate" required
onchange="updateMinCheckoutDate()" >
<br>
<br>
<label> Check-out Date : </label>
<input type="date" id="outdate" name="outdate" >
<br>
<button type="submit"> SUBMIT </button>
</form>

</div>

<script>
function updateMinCheckoutDate() {
var checkInDate = document.getElementById("indate").value;
document.getElementById("outdate").min = checkInDate;
}
</script>
@if
(session('name')&&session('email')&&session('indate')&&session('outdate
'))
@endif
<table>
<tr>
<th>Customer Name</th>
<th>Email</th>
<th>Check-in Date</th>
<th>Check-out Date</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('indate')}}</td>
<td>{{session('outdate')}}</td>
</tr>

</table>

</DIV>
<div>
{{-- Set 6: Event Registration System
• Create EventController.
• Create EventRegistration form with fields: Participant Name,
Email, Event Type, Number of Attendees.
• Validations: All fields are required, Number of Attendees must be
between 1 and 10.
• Display submitted details in a table format. --}}
<h1>Set 6: Event Registration System</h1>

<form action="submitform6" method="post">


@csrf

<label>Participant Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Event Type:</label>
<input type="text" id="type" name="type" required>
<br><br>
<label>Number of Attendees:</label>
<input type="number" id="attend" name="attend" required min="1"
max="10" title="Enter between 1 and 10 attendees">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>
@if
(session('name')&&session('email')&&session('type')&&session('attend'))
@endif

<table>
<tr>
<th> Participant Name</th>
<th>Email</th>
<th> Event Type</th>
<th> Number of Attendees</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('type')}}</td>
<td>{{session('attend')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- Set 7: Employee Registration Form
• Create EmployeeController.
• Create EmployeeRegistration form with fields: Full Name, Email, Phone
Number, Department.
• Validations: All fields are mandatory, Phone Number must be exactly
10 digits.
• Display submitted details in a table format. --}}
<h1>Set 7: Employee Registration Form</h1>

<form action="submitform7" method="post">


@csrf

<label>Full Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>
<label>Phone Number:</label>
<input type="text" id="phone" name="phone" required
pattern="[0-9]{10}" maxlength="10" minlength="10" title="Enter exactly
10 digits">
<br><br>

<label>Department:</label>
<input type="text" id="department" name="department" required>
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>
@if
(session('name')&&session('email')&&session('phone')&&session('departme
nt'))
@endif
<table>
<tr>
<th> Full Name</th>
<th>Email</th>
<th> Phone Number</th>
<th> Department</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('phone')}}</td>
<td>{{session('department')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- Set 8: Online Course Enrollment
• Create CourseController.
• Create CourseEnrollment form with fields: Student Name, Email,
Course Name, Duration (in months).
• Validations: All fields are required, Duration must be a positive
number.
• Display submitted details in a table format --}}
<h1>Set 8: Online Course Enrollment</h1>

<form action="submitform8" method="post">


@csrf

<label>Student Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Course Name:</label>
<input type="text" id="course" name="course" required>
<br><br>

<label>Duration (in months):</label>


<input type="number" id="duration" name="duration" required
min="1" title="Enter a positive number">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>
@if
(session('name')&&session('email')&&session('course')&&session('duratio
n'))
@endif
<table>
<tr>
<th> Full Name</th>
<th>Email</th>
<th> Phone Number</th>
<th> Department</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('course')}}</td>
<td>{{session('duration')}}</td>
</tr>

</table>

</DIV>
<div>
{{-- Set 9: Customer Feedback Form
• Create FeedbackController.
• Create FeedbackForm with fields: Customer Name, Email, Rating (1-
5), Comments.
• Validations: All fields are required, Rating must be between 1
and 5.
• Display submitted details in a table format --}}
<h1>Set 9: Customer Feedback Form</h1>

<form action="submitform9" method="post">


@csrf

<label>Customer Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Rating (1-5):</label>
<input type="number" id="rating" name="rating" required min="1"
max="5" title="Enter a rating between 1 and 5">
<br><br>

<label>Comments:</label>
<input type="text" id="comments" name="comments" required>
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>
@if
(session('name')&&session('email')&&session('rating')&&session('comment
s'))
@endif
<table>
<tr>
<th> Customer Name</th>
<th>Email</th>
<th> Rating</th>
<th> Comments</th>
</tr>

<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('rating')}}</td>
<td>{{session('comments')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- set 10: Bus Ticket Booking System
• Create TicketController.
• Create BusBookingForm with fields: Passenger Name, Email, Source,
Destination, Travel Date.
• Validations: All fields are required, Travel Date should be a
future date.
• Display submitted details in a table format --}}
<h1>Set 10: Bus Ticket Booking System</h1>

<form action="submitform10" method="post">


@csrf

<label>Passenger Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Source:</label>
<input type="text" id="source" name="source" required>
<br><br>

<label>Destination:</label>
<input type="text" id="destination" name="destination"
required>
<br><br>

<label>Travel Date:</label>
<input type="date" id="tdate" name="tdate" required min="{{
date('Y-m-d') }}" title="Please select a future date">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>
@if
(session('name')&&session('email')&&session('sourse')&&session('destina
tion') && session('tdate'))

<table>
<tr>
<th> Passenger Name</th>
<th>Email</th>
<th> Source</th>
<th> Destination</th>
<th> Travel Date</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('sourse')}}</td>
<td>{{session('destination')}}</td>
<td>{{session('tdate')}}</td>
</tr>

</table>
@endif
</DIV>
</body>
</html>

SET 1 - 10 WEB ROUTE CODE

<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Student;
use App\Http\Controllers\Productcontroller;
use App\Http\Controllers\jobcontroller;
use App\Http\Controllers\Librarycontroller;
use App\Http\Controllers\BookingController;
use App\Http\Controllers\EventController;
use App\Http\Controllers\EmployeeController;
use App\Http\Controllers\CourseController;
use App\Http\Controllers\FeedbackController;
use App\Http\Controllers\TicketController;
// set 1
Route::get('/',[Student::class,'index']);

Route::post('submitform1',[Student::class,'onclick']);

// set 2
Route::get('/',[Productcontroller::class,'index']);

Route::post('submitform2',[Productcontroller::class,'onclick']);

// set 3
Route::get('/',[jobcontroller::class,'index']);

Route::post('submitform3',[jobcontroller::class,'onclick']);

//set 4

Route::get('/',[Librarycontroller::class,'index']);

Route::post('submitform4',[Librarycontroller::class,'onclick']);

// set 5

Route::get('/',[BookingController::class,'index']);

Route::post('submitform5',[BookingController::class,'onclick']);

//set 6

Route::get('/',[EventController::class,'index']);

Route::post('submitform6',[EventController::class,'onclick']);

// set 7
Route::get('/',[EmployeeController::class,'index']);

Route::post('submitform7',[EmployeeController::class,'onclick']);
// set 8

Route::get('/',[CourseController::class,'index']);

Route::post('submitform8',[CourseController::class,'onclick']);

// set 9

Route::get('/',[FeedbackController::class,'index']);

Route::post('submitform9',[FeedbackController::class,'onclick']);

// set 10

Route::get('/',[TicketController::class,'index']);

Route::post('submitform10',[TicketController::class,'onclick']);
SET 1 - 10 CONTROLLERS CODE

Set 1 : StudentController
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class Student extends Controller


{
public function index(){
return view('index');
}

public function onclick(Request $request){


$name=$request->input('fullname');
$email=$request->input('email');

$phone=$request->input('phone');

$course=$request->input('course');

return redirect('/')->with(['fullname' => $name,'email' =>


$email,'phone' => $phone,'course' => $course]);

Set 2 : ProductController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class Productcontroller extends Controller


{
public function index(){
return view('index');
}
public function onclick(Request $request){
$productname=$request->input('productname');
$category=$request->input('category');
$price=$request->input('price');
$stock=$request->input('stock');
return redirect('/')-
>with(["productname"=>$productname,'category'=>$category,'price'=>$pric
e,'stock'=>$stock]);

}
}

Set 3 : JobApplicationController
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class jobcontroller extends Controller


{
public function index(){
return view('index');
}
public function onclick(Request $request){
$fullname=$request->input('fullname');
$email=$request->input('email');
$phone=$request->input('phone');
$Position=$request->input('Position');
return redirect('/')-
>with(["fullname"=>$fullname,'email'=>$email,'phone'=>$phone,'Position'
=>$Position]);

}
}

Set 4 : LibraryController
<?php

namespace App\Http\Controllers;
use Illuminate\Http\Request;

class Librarycontroller extends Controller


{
public function index(){
return view('index');
}
public function onclick(Request $request){
$title=$request->input('title');
$author=$request->input('author');
$isbn=$request->input('isbn');
$year=$request->input('year');
return redirect('/')-
>with(["title"=>$title,'author'=>$author,'isbn'=>$isbn,'year'=>$year]);

}
}
Set 5 : BookingController
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class BookingController extends Controller


{
public function index(){
return view('index');
}

public function onclick(Request $request){


$name=$request->input("name");
$email=$request->input("email");
$indate=$request->input("indate");
$outdate=$request->input("outdate");

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'indate'=>$indate,'outdate'=>$outd
ate,]);

}
}
Set 6 : EventController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class EventController extends Controller


{
public function index(){
return view('index');
}

public function onclick(Request $request){


$name=$request->input("name");
$email=$request->input("email");
$type=$request->input("type");
$attend=$request->input("attend");

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'type'=>$type,'attend'=>$attend]);

}
}

Set 7 EmployeeController
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class EmployeeController extends Controller


{
public function index(){
return view('index');
}

public function onclick(Request $request){


$name=$request->input("name");
$email=$request->input("email");
$phone=$request->input("phone");
$department=$request->input("department");

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'phone'=>$phone,'department'=>$dep
artment]);

}
}

Set 8 CourseController
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CourseController extends Controller


{
public function index(){
return view('index');
}

public function onclick(Request $request){


$name=$request->input("name");
$email=$request->input("email");
$course=$request->input("course");
$duration=$request->input("duration");

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'course'=>$course,'duration'=>$dur
ation]);

}
}

Set 9 FeedbackController
<?php

namespace App\Http\Controllers;
use Illuminate\Http\Request;

class FeedbackController extends Controller


{
public function index(){
return view('index');
}

public function onclick(Request $request){


$name=$request->input("name");
$email=$request->input("email");
$rating=$request->input("rating");
$comments=$request->input("comments");

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'rating'=>$rating,'comments'=>$com
ments]);

}
}

Set 10 TicketController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class TicketController extends Controller


{
public function index(){
return view('index');
}

public function onclick(Request $request){


$name=$request->input("name");
$email=$request->input("email");
$sourse=$request->input("sourse");
$destination=$request->input("destination");
$tdate=$request->input("tdate");

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'sourse'=>$sourse,'destination'=>$
destination,'tdate' =>$tdate]);

}
}

SET 11 - 20 BLADE CODE :

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title> SET 11-20 </title>
</head>
<body>
<div>
{{-- Set 11: Medical Appointment System
• Create AppointmentController.
• Create AppointmentForm with fields: Patient Name, Email, Doctor
Name, Appointment Date.
• Validations: All fields are required, Appointment Date should be
a future date.
• Display submitted details in a table format --}}
<h1>Set 11: Medical Appointment System</h1>

<form action="submitform11" method="POST">


@csrf

<label>Patient Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Doctor Name:</label>
<input type="text" id="doctorname" name="doctorname"
required>
<br><br>

<label>Appointment Date:</label>
<input type="date" id="date" name="date" required min="{{
date('Y-m-d') }}" title="Please select a future date">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>

<DIV>

@if
(session('name')&&session('email')&&session('doctorname')&&session('dat
e'))
@endif
<table>
<tr>
<td> Patient Name </td>
<td> Email</td>
<td>Doctor Name</td>
<td>Appointment Date</td>

</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('doctorname')}}</td>
<td>{{session('date')}}</td>
</tr>
</table>
<div>
{{-- Set 12: Car Rental System
• Create CarRentalController.
• Create CarBookingForm with fields: Customer Name, Email, Car
Model, Rental Duration (in days).
• Validations: All fields are required, Rental Duration must be
at least 1.
• Display submitted details in a table format --}}
<h1>Set 12: Car Rental System</h1>

<form action="submitform12" method="post">


@csrf

<label>Customer Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Car Model:</label>
<input type="text" id="model" name="model" required>
<br><br>

<label>Rental Duration (in days):</label>


<input type="number" id="duration" name="duration" required
min="1">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>

@if
(session('name')&&session('email')&&session('modeal')&&session('duratio
n'))
@endif
<table>
<tr>
<th>Customer Name</th>
<th> Emai</th>
<th>Car Model</th>
<th>Rental Duration</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<th>{{session('email')}}</th>
<th>{{session('modeal')}}</th>
<th>{{session('duration')}}</th>
</tr>

</table>

</DIV>
<div>
{{-- Set 13: Restaurant Table Reservation
• Create ReservationController.
• Create TableBookingForm with fields: Customer Name, Email, Number
of Guests, Reservation Date.
• Validations: All fields are required, Number of Guests must be at
least 1.
• Display submitted details in a table format --}}
<h1>Set 13: Restaurant Table Reservation</h1>

<form action="submitform13" method="post">


@csrf

<label>Customer Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Number of Guests:</label>
<input type="number" id="guest" name="guest" required min="1">
<br><br>

<label>Reservation Date:</label>
<input type="date" id="date" name="date" required>
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>
@if
(session('name')&&session('email')&&session('guest')&&session('date'))
@endif
<table>
<tr>
<th> Customer Name</th>
<th>Email</th>
<th>Number of Guests </th>
<th>Reservation Date</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('guest')}}</td>
<td>{{session('date')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- Set 14: Gym Membership Registration
• Create GymController.
• Create MembershipForm with fields: Full Name, Email, Membership
Type, Duration (in months).
• Validations: All fields are required, Duration must be at least 1
month.
• Display submitted details in a table format --}}
<h1>Set 14: Gym Membership Registration</h1>

<form action="submitform14" method="post">


@csrf

<label>Full Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Membership Type:</label>
<input type="text" id="type" name="type" required>
<br><br>

<label>Duration (in months):</label>


<input type="number" id="duration" name="duration" required
min="1">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>

@if
(session('name')&&session('email')&&session('type')&&session('duration'
))
@endif
<table>
<tr>
<th> Full Name</th>
<th>Email</th>
<th> Membership Type</th>
<th>Duration</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('type')}}</td>
<td>{{session('duration')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- Set 15: Electricity Bill Payment System
• Create BillController.
• Create BillPaymentForm with fields: Customer Name, Email, Bill
Number, Amount.
• Validations: All fields are required, Amount must be positive.
• Display submitted details in a table format --}}
<h1>Set 15: Electricity Bill Payment System</h1>

<form action="submitform15" method="post">


@csrf

<label>Customer Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Bill Number:</label>
<input type="number" id="billnumber" name="billnumber"
required>
<br><br>

<label>Amount:</label>
<input type="number" id="amount" name="amount" required
min="1">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>

@if
(session('name')&&session('email')&&session('billnumber')&&session('amo
unt'))
@endif
<table>
<tr>
<th>Customer Name</th>
<th>Email</th>
<th>Bill Number</th>
<th>Amount</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('indate')}}</td>
<td>{{session('outdate')}}</td>
</tr>

</table>

</DIV>

<div>
{{-- Set 16: College Admission Form
• Create AdmissionController.
• Create AdmissionForm with fields: Student Name, Email, Course
Name, Previous Qualification.
• Validations: All fields are required.
• Display submitted details in a table format --}}
<h1>Set 16: College Admission Form</h1>

<form action="submitform16" method="post">


@csrf

<label>Student Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Course Name:</label>
<input type="text" id="course" name="course" required>
<br><br>

<label>Previous Qualification:</label>
<input type="text" id="previous" name="previous">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>

@if
(session('name')&&session('email')&&session('corse')&&session('previous
'))
@endif

<table>
<tr>
<th>Student Name</th>
<th>Email</th>
<th> Course Name</th>
<th> Previous Qualification</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('type')}}</td>
<td>{{session('attend')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- Set 17: Travel Package Booking
• Create TravelController.
• Create PackageBookingForm with fields: Traveler Name, Email,
Destination, Travel Date.
• Validations: All fields are required, Travel Date must be a
future date.
• Display submitted details in a table format --}}
<h1>Set 17: Travel Package Booking</h1>

<form action="submitform17" method="post" onsubmit="return


validateDate()">
@csrf

<label>Traveler Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Destination:</label>
<input type="text" id="destination" name="destination"
required>
<br><br>

<label>Travel Date:</label>
<input type="date" id="date" name="date" required>
<br><br>

<button type="submit">SUBMIT</button>
</form>

<script>
function validateDate() {
var travelDate = document.getElementById("date").value;
var today = new Date().toISOString().split("T")[0]; // Get
today's date in YYYY-MM-DD format

if (travelDate <= today) {


alert("Travel Date must be in the future.");
return false; // Prevent form submission
}
return true; // Allow form submission
}
</script>
</div>

@if
(session('name')&&session('email')&&session('destination')&&session('da
te'))
@endif
<table>
<tr>
<th> Traveler Name </th>
<th>Email</th>
<th> Destination</th>
<th> Travel Date</th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('destination')}}</td>
<td>{{session('date')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- Set 18: Water Supply Connection Request
• Create WaterSupplyController.
• Create ConnectionRequestForm with fields: Customer Name, Email,
Address, Connection Type.
• Validations: All fields are required, Address must not exceed 255
characters.
• Display submitted details in a table format --}}
<h1>Set 18: Water Supply Connection Request</h1>

<form action="submitform18" method="post">


@csrf

<label>Customer Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Address:</label>
<input type="text" id="address" name="address" required
maxlength="255">
<br><br>

<label>Connection Type:</label>
<input type="text" id="type" name="type">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>
@if
(session('name')&&session('email')&&session('address')&&session('type')
)
@endif
<table>
<tr>
<th> Customer Name </th>
<th>Email</th>
<th> Address</th>
<th> Connection Type </th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('address')}}</td>
<td>{{session('type')}}</td>
</tr>
</table>

</DIV>
<div>
{{-- Set 19: Insurance Policy Registration
• Create InsuranceController.
• Create PolicyRegistrationForm with fields: Full Name, Email, Policy
Type, Premium Amount.
• Validations: All fields are required, Premium Amount must be a
positive number.
• Display submitted details in a table format. --}}
<h1>Set 19: Insurance Policy Registration</h1>

<form action="submitform19" method="post">


@csrf

<label>Full Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Policy Type:</label>
<input type="text" id="type" name="type" required>
<br><br>

<label>Premium Amount:</label>
<input type="number" id="amount" name="amount" required
min="1">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>
@if
(session('name')&&session('email')&&session('type')&&session('amount'))
@endif
<table>
<tr>
<th>Full Name</th>
<th>Email</th>
<th> Policy Type</th>
<th> Premium Amount</th>
</tr>

<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('type')}}</td>
<td>{{session('amount')}}</td>
</tr>

</table>
</DIV>
<div>
{{-- Set 20: Movie Ticket Booking System
• Create MovieController.
• Create TicketBookingForm with fields: Customer Name, Email, Movie
Name, Number of Tickets.
• Validations: All fields are required, Number of Tickets must be
at least 1.
• Display submitted details in a table format --}}
<h1>Set 20: Movie Ticket Booking System</h1>

<form action="submitform20" method="post">


@csrf

<label>Customer Name:</label>
<input type="text" id="name" name="name" required>
<br><br>

<label>Email:</label>
<input type="email" id="email" name="email" required>
<br><br>

<label>Movie Name:</label>
<input type="text" id="moviename" name="moviename" required>
<br><br>

<label>Number of Tickets:</label>
<input type="number" id="tickets" name="tickets" required
min="1">
<br><br>

<button type="submit">SUBMIT</button>
</form>
</div>
@if
(session('name')&&session('email')&&session('moviename')&&session('tick
ets') )

<table>
<tr>
<th> Customer Name </th>
<th>Email</th>
<th> Movie Name</th>
<th> Number of Tickets </th>
</tr>
<tr>
<td>{{session('name')}}</td>
<td>{{session('email')}}</td>
<td>{{session('moviename')}}</td>
<td>{{session('tickets')}}</td>

</tr>

</table>
@endif
</DIV>
</body>
</html>

SET 11 - 20 WEB ROUTE CODE


<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AppointmentController;

use App\Http\Controllers\CarRentalController;
use App\Http\Controllers\ReservationController;
use App\Http\Controllers\GymController;
use App\Http\Controllers\BillController;
use App\Http\Controllers\AdmissionController;
use App\Http\Controllers\TravelController;
use App\Http\Controllers\WaterSupplyController;
use App\Http\Controllers\InsuranceController;
use App\Http\Controllers\MovieController;

// set 11
Route::get('/',[AppointmentController::class,'index']);

Route::post('submitform11',[AppointmentController::class,'onclick']);
// set 12
Route::get('/',[CarRentalController::class,'index']);

Route::post('submitform12',[CarRentalController::class,'onclick']);
//13
Route::get('/',[ReservationController::class,'index']);

Route::post('submitform13',[ReservationController::class,'onclick']);

///14
Route::get('/',[GymController::class,'index']);

Route::post('submitform14',[GymController::class,'onclick']);
//15

Route::get('/',[BillController::class,'index']);

Route::post('submitform15',[BillController::class,'onclick']);
///16
Route::get('/',[AdmissionController::class,'index']);

Route::post('submitform16',[AdmissionController::class,'onclick']);
//17

Route::get('/',[TravelController::class,'index']);

Route::post('submitform17',[TravelController::class,'onclick']);
//18

Route::get('/',[WaterSupplyController::class,'index']);

Route::post('submitform18',[WaterSupplyController::class,'onclick']);
//19
Route::get('/',[InsuranceController::class,'index']);

Route::post('submitform19',[InsuranceController::class,'onclick']);
//20
Route::get('/',[MovieController::class,'index']);

Route::post('submitform20',[MovieController::class,'onclick']);

SET 1 - 10 CONTROLLERS CODE

Set 11 AppointmentController
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class AppointmentController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$doctorname=$request->input('doctorname');
$date=$request->input('date');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'doctorname'=>$doctorname,'date'=>
$date,]);

}
}

Set 12 CarRentalController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class CarRentalController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$modeal=$request->input('modeal');
$duration=$request->input('duration');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'modeal'=>$modeal,'date'=>$duratio
n,]);

}
}

Set 13 ReservationController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class ReservationController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$guest=$request->input('guest');
$date=$request->input('date');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'guest'=>$guest,'date'=>$date,]);

}
}

Set 14 GymController
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class GymController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$type=$request->input('type');
$duration=$request->input('duration');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'type'=>$type,'duration'=>$duratio
n,]);

}
}

Set 15 BillController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class GymController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$type=$request->input('type');
$duration=$request->input('duration');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'type'=>$type,'duration'=>$duratio
n,]);

}
}

Set 16 AdmissionController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class AdmissionController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$corse=$request->input('corse');
$previous=$request->input('previous');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'corse'=>$corse,'previous'=>$previ
ous,]);

}
}

Set 17 TravelController
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class TravelController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$destination=$request->input('destination');
$date=$request->input('date');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'docdestinationtorname'=>$destinat
ion,'date'=>$date,]);

}
}

Set 18 WaterSupplyController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class WaterSupplyController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$address=$request->input('address');
$type=$request->input('date');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'address'=>$address,'type'=>$type,
]);

}
}

Set 19 InsuranceController

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class InsuranceController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$type=$request->input('type');
$amount=$request->input('amount');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'type'=>$type,'amount'=>$amount,])
;

}
}

Set 20 MovieController
<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class MovieController extends Controller


{
public function index(){
return view('index1');

}
public function onclick(Request $request){
$name=$request->input('name');
$email=$request->input('email');
$moviename=$request->input('moviename');
$tickets=$request->input('tickets');

return redirect('/')-
>with(['name'=>$name,'email'=>$email,'moviename'=>$moviename,'tickets'=
>$tickets,]);

}
}

You might also like