I am create a project which name is Project Management in laravel.In this project various project related information can store in database such as project name,starting date, deadline date etc.All project related information can shown in projectlist blade file.Now my question is how i can change table row color when a project is assingn in projectlist blade. My project table code { class CreateProjectsTable extends Migration /** * Run the migrations. * * @return void */ public function up() { Schema::create('projects', function (Blueprint $table) { $table->increments('id'); $table->string('project_title'); $table->string('type'); $table->string('category'); $table->text('description'); $table->string('image'); $table->string('url'); $table->date('starting_date'); $table->date('ending_date'); $table->string('remarks'); $table->string('assign_to'); $table->string('assign_by'); $table->string('team_member'); $table->string('status'); }); }
My projectlist blade file
@extends('layouts.app')
@section('content')
<div class="container-fluid" style="margin-left: 250px">
<div class="row " style="margin-top: 0px">
<div class="col-md-4" id="sidebar-wrapper">
@include('sidebar')
</div>
<div class="col-md-8" >
<div class="card-header"></div>
<table class="table" style="height: 800px; overflow-y: scroll">
<tr>
<th>Project Title</th>
<th>Type</th>
<th>Category</th>
<th>Description</th>
<th>URL</th>
<th>Starting Date</th>
<th>Ending Date</th>
<th>Remarks</th>
<th>Assign To</th>
<th>Assign By</th>
<th>Team Member</th>
<th>Image</th>
<th>Status</th>
<th>Action</th>
</tr>
@foreach($project as $item)
<tr>
<td>{!! $item['project_title'] !!}</td>
<td>{!! $item['type'] !!}</td>
<td>{!! $item['category']!!}</td>
<td>{!! $item['description'] !!}</td>
<td>{!! $item['url'] !!}</td>
<td>{!! $item['starting_date'] !!}</td>
<td>{!! $item['ending_date'] !!}</td>
<td>{!! $item['remarks'] !!}</td>
<td>{!! $item['assign_to'] !!}</td>
<td>{!! $item['assign_by'] !!}</td>
<td>{!! $item['team_member'] !!}</td>
<td><img src="" style="height:50px; width: 60px; ">
{!! $item['image'] !!}</td>
<td>{!! $item['status'] !!}</td>
<td>
<a href="//edit" class="btn btn-primary btn-sm">Edit</a>
<a href="/" class="btn btn-info btn-sm">Show</a>
<form action="/" method="post">
@method('DELETE')
{!! csrf_field() !!}
<input type="submit" class="btn btn-danger btn-sm" value="Delete">
</form>
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
@endsection
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire