관리-도구
편집 파일: news_details.blade.php
@extends('frontend.layouts.app') @section('meta') @include('frontend.includes.meta') @endsection @section('content') {{-- Nepali Number Converter --}} <?php function ent_to_nepali_num_convert($number){ $eng_number = array( "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ); $nep_number = array( "०", "१", "२", "३", "४", "५", "६", "७", "८", "९" ); return str_replace($eng_number, $nep_number, $number); } ?> {{-- Number Converter --}} <!-- Banner --> {{-- <section class="banner pt pb" style="background-image: url('{{ asset($news->cover_image) }}'); background-position:center; background-size: cover; "> <div class="container"> <h1>{{ getLangValue($news->title) }}</h1> <nav aria-label="breadcrumb"> <ol class="breadcrumb"> <li class="breadcrumb-item"><a href="{{ route('index') }}">Home</a></li> <li class="breadcrumb-item active" aria-current="page">{{ getLangValue($news->title) }}</li> </ol> </nav> </div> </section> --}} <!-- Banner End --> <!-- Details --> <section class="details-page mt mb"> <div class="container"> <div class="details-wrap"> <div class="details-left text-center"> @php $nepali_date = datenep($news->written_on); $nepali_array = explode('-', $nepali_date); $nepali_month = nepaliMonth($nepali_array[1]); $nepali_bar = nepaliNumber($nepali_array[2]); @endphp </div> <div class="details-right"> <h2>{{ getLangValue($news->title) }}</h2> <div class=""> @if (session('locale') == "np") {{-- {{ date('Y M d', strtotime($news->written_on)) }} --}} {{$news->author}} {{ ent_to_nepali_num_convert(date('Y',strtotime($nepali_date))) }} {{ $nepali_month }} {{ $nepali_bar }} @else {{$news->author}} {{ date('Y M d', strtotime($news->written_on)) }} @endif </div> <br> <img src="{{ (($news->cover_image)) ? (asset($news->cover_image)) : (asset('static_img/News.png')) }}" alt="{{ $news->title['en'] }}"> <p>{!! getLangValue($news->content) !!}</p> </div> </div> </div> </section> <!-- Details End --> @endsection